I have this bit of code that I use to spam click when I go afk.
Code: Select all
Loop
{
click
sleep 150
click
sleep 150
}
return
I would like to make it so that it only runs (toggle script on/off) when I press a certain button. As it is now I just double click the ahk file and alt tab to which program I want the clicks to go to and line it up. Closing it is a little more awkward so this would be much cleaner if only activated by hotkey.
I also want to add a subroutine that is only active after toggling a 2nd hotkey. This one would look for a specific pixel pattern and click it if found. Anyone know how to do this in a beginner friendly way?