Page 1 of 1

Need help with a script

Posted: 24 May 2019, 03:30
by meebler
This script below stopped working for some reason... How do i fix it?
I want it to press w at random intervals between 200-300ms and be able to pause it with f1.
I want the script to be simple as possible


#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Loop
{
Random,rand, 200, 300,
Sleep rand
Send {w}
}


f1::
Pause
Suspend
return

Re: Need help with a script

Posted: 24 May 2019, 04:01
by AviationGuy
Hi there,
Try Sleep % rand