Help with this loop please

Ask gaming related questions
crazyrick
Posts: 1
Joined: 08 Dec 2017, 23:58

Help with this loop please

09 Dec 2017, 00:12

I need help making a script that does this. I want to be able to hold Number pad 1 and For this to start a loop with “W”. I need there to be a random delay between the “W” key presses and also a random delay between the pressed down “W” and presses up “W”.
Rohwedder
Posts: 886
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help with this loop please

09 Dec 2017, 04:07

Hallo,
try:

Code: [Select all] [Download] GeSHi © Codebox Plus

NumPad1::
While GetKeyState("NumPad1","P")
{
Send, {w Down}
Random, PressTime, 100, 500 ;ms Min,Max
Sleep, PressTime
Send, {w Up}
Random, SleepTime, 200, 700
Sleep, SleepTime
}
Return

Return to “Gaming”

Who is online

Users browsing this forum: zarioftw and 8 guests