I manage to make a script to press F1 and SPACE in an infinite loop:
Code: Select all
~F7::
loopActive:=!loopActive
while loopActive
{
Send {F1}{SPACE}
}
return
However, I am unable to set a time between repeating the sequence. The purpose is to wait 20seconds between a new run. I tried these two ones, but none is working. The script runs without any interruption in the loop.
Code: Select all
~F7::
loopActive:=!loopActive
while loopActive
{
Send {F1}{SPACE}
Sleep, 20000
}
and
Code: Select all
~F7::
loopActive:=!loopActive
while loopActive
{
Send {F1}{SPACE}
SetKeyDelay, 20000
}
Can anyone help me adapt this, so I can have a 20 seconds pause between repeating the sequence? Thank you.