Trevor_zam
Trevor_zam

Reputation: 455

Script doesn't work when I try to launch it

I am using Autohotkey. I want to use F1 key to start the script and Esc to stop it. I want the script to loop twice where the left mouse clicks once, waits 5 seconds, click the number 1 (above the letter Q on keyboard), wait 46 seconds and then left mouse click again. The following is my script but nothing happens when I click F1. The script is definitely active. Please advice. Thank you.

$F1::
Loop 2,
{
    Send {LButton}
    Sleep 5000
    1::Click;
    Sleep 46000
}
Esc::ExitApp

Upvotes: 0

Views: 152

Answers (1)

KSFT
KSFT

Reputation: 1774

Does this work?

$F1::
Loop, 2
{
    Click
    Sleep 5000
    Send {1}
    Sleep 46000
}
return
Esc::ExitApp

Upvotes: 2

Related Questions