Hey
I want to use a hotkey like !MButton + vertical mouse movement in order to send WheelUp that is related to the amount of movement.
Meaning: If the mouse has been moved a lot, send a lot of wheelup.
Being able to control this sensitivity would also be great.
Any help would be appreciated thank you
Vertical MouseMove to Wheel? Topic is solved
Re: Vertical MouseMove to Wheel? Topic is solved
Its useful idea to me. I made it in a simple way. I think it would be better if apply acceleration.
And this is I will use horizontal scrolling added version.
Code: Select all
!MButton::
current := 0
MouseGetPos,, y1
while (GetKeyState("MButton", "P")) {
MouseGetPos,, y2
offset := (y2-y1)//10 ; set scroll per pixel
if (current != offset) {
count := offset-current
loop % Abs(count)
Send % count > 0 ? "{WheelDown}" : "{WheelUp}"
current := Offset
}
Sleep 10
}
return
Code: Select all
MButton::
currentX := currentY := 0
MouseGetPos x1, y1
while (GetKeyState("MButton", "P")) {
MouseGetPos x2, y2
offsetX := (x2-x1)//10
offsetY := (y2-y1)//10
if (currentX != offsetX) {
count := offsetX-currentX
loop % Abs(count)
Send % count > 0 ? "{WheelRight}" : "{WheelLeft}"
currentX := offsetX
}
if (currentY != offsetY) {
count := offsetY-currentY
loop % Abs(count)
Send % count > 0 ? "{WheelDown}" : "{WheelUp}"
currentY := offsetY
}
Sleep 10
}
return
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Vertical MouseMove to Wheel?
Great stuff, thank you so much.