help with playing macro only once
Posted: 08 Jun 2018, 02:48
Hey, I have this double-click (I think it is double-click, lol, if it's not, please help me make it double-click) macro with random sleep times that is played repeatedly, it works just fine, but the problem is, I want it to be only played once when the key is pressed, how can I make it work? I'm sure there's a simple answer for that but I am still a newbie and can't really find anything, please help.
The script:
The script:
Code: Select all
\::
While GetKeyState("\","P")
{
send, {LCtrl down}
sleep, % _ran(18, 53)
send, {LCtrl up}
sleep, % _ran(19, 55)
}
return
_ran(min, max)
{
random, ran, %min%, %max%
return ran
}