The script is for a game with mining, you hold 's' for 30 seconds, rocks appear. You re position your character again and then continue to drill again. I got it to hold 's' for 30~ seconds (although at times the rate changes for some reason) but I cannot get my character to move down and then point to the right after reliably. (it works some times however not every time)
Furthermore, I tried to add a loop at the beginning so it performs the action 5 times and that did not work at all.
Here's what I have:
Please note: 'k' is down and 'l' is right in this game.
Code: Select all
\::
{
Sendinput {s down}
Sleep 100
while A_TimeSinceThisHotkey < 32000
{
Sendinput {s down}
Sleep 1
}
Sendinput {s up}
Sendinput {k down}
Sleep 100
while A_TimeSinceThisHotkey < 32500
{
Sendinput {k down}
Sleep 1
}
Sendinput {k up}
Sendinput {l down}
Sleep 100
while A_TimeSinceThisHotkey < 33000
{
Sendinput {l down}
Sleep 1
}
Sendinput {l up}
}
return