Spam key with random intervals
Spam key with random intervals
I need a macro that when i press 2 it spams 2 with random intervals from 1 - 10 seconds, and to stop the loop i have to press 2 or 3 (both 2 and 3 can cancel the loop)
Re: Spam key with random intervals
Welcome to this AutoHotkey forum!
Code: Select all
#Requires AutoHotkey v2.0
on := False
$2::
3:: {
Global on
SetTimer go, on := ThisHotkey = 3 ? False : !on
SoundBeep 1000 + 500 * on
}
go() {
(on) && Send(2)
SetTimer go, Random(-1000, -10000)
}
Who is online
Users browsing this forum: No registered users and 22 guests