What I'm trying to achieve is the following; I want my character to walk a certain distance while holding the RIGHT arrow, then pressing the LShift button down for 200 miliseconds.
However, these commands seem to get messed up, the jump only seems to happen at the moment the command for RIGHT is finished, and not during the RIGHT press event.
Could anyone please give me any advice on how to handle this? This is my current code:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^j::
SendInput {Right down}
Sleep 3000
SendInput {LShift down}
Sleep 200
SendInput {Right up}
SendInput {LShift up}
Return
Edit: Apologies for the double post in the wrong forum section. Since I've posted this I've looked into Timers, since that seems to be what I'm looking for, but I can't seem to figure it out.