8000 Found an easier solution · Issue #1 · satyagraha/mousecruise · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Found an easier solution #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
satyagraha opened this issue Mar 5, 2018 · 1 comment
Open

Found an easier solution #1

satyagraha opened this issue Mar 5, 2018 · 1 comment

Comments

@satyagraha
Copy link
Owner

Suggest using AutoHotKeys. Here's a script, tweak params as desired:

zoomspeed = 50
delta = 20

XButton1::
loop
{
	CoordMode, Mouse, Screen
	MouseGetPos, m_x, m_y
	hw_m_target := DllCall( "WindowFromPoint", "int", m_x, "int", m_y )
	SendMessage, 0x20A, delta << 16, ( m_y << 16 )|m_x,, ahk_id %hw_m_target%
	GetKeyState, state1, XButton1, P
	if state1 = U
		break
	Sleep, zoomspeed
}
return

XButton2::
loop
{
	CoordMode, Mouse, Screen
	MouseGetPos, m_x, m_y
	hw_m_target := DllCall( "WindowFromPoint", "int", m_x, "int", m_y )
	SendMessage, 0x20A, (-delta) << 16, ( m_y << 16 )|m_x,, ahk_id %hw_m_target%
	GetKeyState, state2, XButton2, P
	if state2 = U
		break
	Sleep, zoomspeed
}
return
@satyagraha
Copy link
Owner Author

Use DllCall( "WindowFromPoint", "int64", m_x | (m_y << 32), "Ptr") for 32/64 bit compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0