timed 3 button macro

Post gaming related scripts
Mr_Derp
Posts: 2
Joined: 13 Feb 2019, 17:04

timed 3 button macro

13 Feb 2019, 17:18

So after trial and error, researching and trying my best to take it on myself I've found myself here.

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

_G8_
Posts: 3
Joined: 12 Feb 2019, 13:29

Re: timed 3 button macro

13 Feb 2019, 19:35

Try using Send instead of Sendinput. That may clear up some problems. I too struggle with the delays/timing of events not being consistent. Not sure why that happens.
Mr_Derp
Posts: 2
Joined: 13 Feb 2019, 17:04

Re: timed 3 button macro

14 Feb 2019, 09:13

_G8_ wrote:
13 Feb 2019, 19:35
Try using Send instead of Sendinput. That may clear up some problems. I too struggle with the delays/timing of events not being consistent. Not sure why that happens.
Yeah I tried that as well as sendgame and I've had no such luck :|

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 7 guests