How to send smooth scroll signal or detect fail?

Get help with using AutoHotkey and its commands and hotkeys
Sashkon
Posts: 35
Joined: 23 Dec 2017, 05:13
Facebook: Alexander Murvajev
Google: Alexander Murvajev
GitHub: Alexander

How to send smooth scroll signal or detect fail?

17 Sep 2020, 09:25

I want to send smooth scroll signal like touchpad. I tried this code. It works great in chrome, but some apps ignore it. Windows file manager ignores it and windows settings too.
If it's not possible to fix I want to detect if it's not working and send usual scroll signal

Code: Select all

PostMW(deltay, deltax := 0)
{ ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms645617(v=vs.85).aspx
	CoordMode, Mouse, Screen
	MouseGetPos, x, y
	ControlGetFocus, control, A
	Modifiers := 0x8*GetKeyState("ctrl") | 0x1*GetKeyState("lbutton") | 0x10*GetKeyState("mbutton")
				|0x2*GetKeyState("rbutton") | 0x4*GetKeyState("shift") | 0x20*GetKeyState("xbutton1")
				|0x40*GetKeyState("xbutton2")

	if (deltay != 0) {
		PostMessage, 0x20A, deltay << 16 | Modifiers, y << 16 | x ,, A
	}
	if (deltax != 0) {		
		PostMessage, 0x20E, deltax << 16 | Modifiers, y << 16 | x ,, A
	}
}

f3::
    PostMW(5)
return
f4::
    PostMW(-5)
return

Return to “Ask For Help”

Who is online

Users browsing this forum: EmmaJackson2711, Google [Bot], scriptor2016 and 34 guests