I do not mind it running if there's no perceived impact on system resources - I just mind it popping up and having to clear it down.
For that matter I wrote this script,
Code: Select all
SetTitleMatchMode 2
id := "dialogue title"
IfWinexist, dialogue title
WinActivate ;
SendInput {Esc}
So, I then added a line,
Code: Select all
SetTitleMatchMode 2
id := "Opera_GX"
IfWinexist, Opera_GX
WinActivate ;
Esc:: Send {Esc}
SendInput {Esc}
And this ensures it remains in the Systray because it is waiting for the keystroke to be manually entered. There is an issue however with this, it will send the Esc keystroke tens of times per second every time it is pressed in any other context, and then another dialogue will pop up for the script itself asking if that is what you want and whether or not to keep running it?
The obvious answer is therefore to now use an alternative to clearing the dialogue down, not a simple Esc keystroke, but e.g. making the dialogue the active window in the foreground, defining the pixel coordinates of either the 'X' close button in top right, or 'Ok' button and sending the mouse l/click instruction instead.
I guess I'm happy that any & all of this is possible - but a script could be kept very simple for these sorts of instances, like the first and simplest one I created.
...I'm aware that program update is not going ahead [it's only a 'check for update' though after all] and I'm choosing to acknowledge this by ignoring it, and at some stage I will need to reinstall a more recent app version to bring it up to speed that way instead, and then likely choose/rename it's path(s) too, to avoid it all happening again..., but essentially a script waiting on that popup needn't be more than the simplest/most succinct way of handling the matter - once a WinTitle is specified, the way the dialogue is closed [using Esc] should be limited to just that dialogue window and not prevent the Esc keystroke behaving differently in any other way [affecting other active windows].
I feel I have missed something therefore in specifying the WinTitle and a function of the Esc key in that context - as it performs differently as a result in other windows/desktop environment...
...Any pointers?
[Mod edit: Removed a supposedly unintentional s-tag (strikethrough).]
[Mod edit: Moved topic from AHK v2 help to v1 help, since this is not v2 code. AHK v2 is the new main release.]