I'm trying to get this script to spam space randomly between 0.04 - 0.08 seconds in-between each space.
I'm using Razer Synapse 2 to record the macro and see the stats.
https://imgur.com/a/CNcFx0H
https://imgur.com/a/XWMyPAq
1st problem = The delay sometimes repeat itself (all numbers should be random!)
2nd problem = I don't know how to add the random delay for when the key is pressed down then goes up.
3rd problem = The delay goes out of the suggested random delay string (sometimes goes up to 0.1 seconds 0r down to 0.00 seconds).
Code:
Code: Select all
ALT::Suspend, Toggle
*~$Space::
Loop
{
GetKeyState, SpaceState, Space, P
If SpaceState = U
break
Random, r, 40, 80
sleep r
Send, {Blind}{Space}
}
return