Anyone can help me solve this problem ?
Heres full script :
Code: Select all
ScriptActive = 1
~w up::
If ScriptActive = 1
{
if(GetKeyState("s","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=50
Send {s down}
While (!GetKeyState("s","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 1
If !GetKeyState("s","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {s up}
}
return
~a up::
If ScriptActive = 1
{
if(GetKeyState("d","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=50
Send {d down}
While (!GetKeyState("d","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 1
If !GetKeyState("d","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {d up}
}
return
~d up::
If ScriptActive = 1
{
if(GetKeyState("a","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=50
Send {a down}
While (!GetKeyState("a","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 1
If !GetKeyState("a","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {a up}
}
return
~s up::
If ScriptActive = 1
{
if(GetKeyState("w","P")) ; if w is pressed, do not perform sub
return
start:=A_TickCount
start+=50
Send {w down}
While (!GetKeyState("w","P") && A_TickCount<start) ; if w is pressed, exit this While loop. Exit after 100 ms regardless
Sleep 1
If !GetKeyState("w","P") ; if you are holding w down physically, you don't want to send a w up keystroke
Send {w up}
}
return
CAPSLOCK:: SUSPEND