Code: Select all
RIGHT := 20
LEFT := -20
~d::
while GetKeyState("d")
{
DllCall("mouse_event", uint, 1, int, RIGHT, int, 0, uint, 0, int, 0)
Sleep 1
}
return
~a::
while GetKeyState("a")
{
DllCall("mouse_event", uint, 1, int, LEFT, int, 0, uint, 0, int, 0)
Sleep 1
}
return
return
Everything works fine in itself but i wish i could sort of have a bind for all of that. What i want is so the code i wrote only does its thing when im holding my mouse button (XButton1).
As and example i would be typing normaly right now with "a" and "d" and my mouse would not turn it self but when im holding down the mouse button i specified it would start turning if i hold a and d.
Ive attempted to do it with a while but it doesnt work, unless i did it wrong.