AutoHotKey - change mouse position and click a specific key every time window comes up
- by John
I'm a newbie to AHK, learning the basics. I'm using Notepad as an example - I want to hit the Cancel key every time I close Notepad and it asks if I want to Save/Don't Save/Cancel.
I've come up with the script below and it works once but then I have to reload the script to do it again. I want it to hit Cancel every time the question box comes up. I thought Loop would work but am doing something wrong. Any ideas why, anyone?
Loop
IfWinExist Notepad,
{
WinWait Notepad
WinActivate
Click 312, 109
return
}