while pressing W i want to the sript to hold down 1, wait for 1000ms and press 4 => rinse & repeat till i release W
heres my approach:
Code: Select all
~w::
while KeyIsDown := GetKeyState("w", "p")
{
Send {1 Down}
Sleep, 10
}
Sleep, 1000
SendInput,4
Send {1 Up}
return
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
[Mod edit: Moved topic from 'Ask for Help (v2) > Gaming' since this is AHK v1 code.]