Yesterday while debugging my AutoHotkey script, I accidentally triggered an endless loop of MouseMove
and MouseClick
events. Every 0.5 seconds my mouse
You could also make your script #SingleInstance force
and watch for a "-quit" argument or something.
#SingleInstance force
#Persistent
If A_Args[1] == "--stop"
ExitApp
; just some random stuff for the script to do
count := 0
Loop,
{
count++
Tooltip, %count%
Sleep, 200
}
So you run the same script again but with the argument. And BAM its gone.
Just for completeness. @Stevoisiak's answer is already great for the purpose requested.