Is there any way to have a script where, when I press the {r} key while the {a} key is being held down, it rapidly moves my mouse to the right in short increments? And then move my mouse to the left when the d key is being held down and r is pressed in the same manner?
Thank you
Small increments but rapid mouse movement when a key is pressed?
Re: Small increments but rapid mouse movement when a key is pressed?
Hope this helps:
Code: Select all
Loop,
{
While (GetKeyState("a", "P") && GetKeyState("r", "P"))
MouseMove, 1279, 308 ; X,Y Coordinates
While (GetKeyState("d", "P") && GetKeyState("r", "P"))
MouseMove, 0, 418 ; X,Y Coordinates
}
-
- Posts: 854
- Joined: 21 Dec 2015, 02:34
Re: Small increments but rapid mouse movement when a key is pressed?
sounds like you're trying to rotate the canvas in an art application. Is it Photoshop?
If so, try this. Just hold down r, and then hold down either a or d at the same time. No need to hold down lbutton.
If so, try this. Just hold down r, and then hold down either a or d at the same time. No need to hold down lbutton.
Code: Select all
Loop,
{
While (GetKeyState("a", "P") && GetKeyState("r", "P"))
{
MouseMove, 100, 0, 10, R
}
While (GetKeyState("d", "P") && GetKeyState("r", "P"))
{
MouseMove, -100, 0, 10, R
}
}
return
~r::
sendinput {lbutton down}
return
r up::
sendinput {lbutton up}
return
esc::
exitapp
return