1
votes

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
1

1 Answers

1
votes

Try this:

$1::
freq:=16000
Loop
{
    Send, 1
    Sleep %freq%
    Send, 2
    Sleep %freq%
    Send, 3
    Sleep %freq%
    Send, 4
}
return