My goal is to press T, and then it sends a WheelUp input. However, there's a 50% chance to then sleep 100-250ms and send a WheelDown input.
For some reason, it's doing Wheelup then Wheeldown 100% of the time - so my randomization isn't working properly. I used this a lot before for different purposes but I can't get it to work for this.
Here's my code.
Code: Select all
ran(min, max)
{
random, ran, min, max
return ran
}
T::
send {WheelUp}
Random, rnd,1,100
#if (rnd <= 50)
Sleep, % ran(100, 250)
send {WheelDown}
return