Reputation: 13
Having a bit of trouble setting up a simple AutoHotKey loop that will hit buttons 1, 2, 3 and 4 on the keyboard with a 16 second pause in between. I don't need a toggle, which I know can complicate things (I'll just stop/pause the script manually).
Here's what I have so far, but all is seems to do is make the 1 button unsuable. The script does seem to be running, but it doesn't seem to activate the buttons when I test it in a text window. Any help would be greatly appreciated.
$1::
freq:=16000
Loop
(
Send (1)
Sleep %freq%
Send (2)
Sleep %freq%
Send (3)
Sleep %freq%
Send (4)
)
return
Upvotes: 1
Views: 172
Reputation: 6930
Try this:
$1::
freq:=16000
Loop
{
Send, 1
Sleep %freq%
Send, 2
Sleep %freq%
Send, 3
Sleep %freq%
Send, 4
}
return
Upvotes: 1