Code: Select all
!e::MsgBox I don't want this messagebox to happen when app1 is active.
Code: Select all
#IfWinNotActive app1
!e::MsgBox I don't want this messagebox to happen when app1 is running.
#IfWinActive
Is there any method by which script2 could intercept Alt+e so that script1 doesn't trigger it's hotkey for it? Assume both script1 and script2 are constantly running.
One potential method so far would be to have a timer in script2 to check if app1 is active and if it is, use PostMessage to suspend hotkeys (https://www.autohotkey.com/docs/FAQ.htm#close) for script1, and unsuspend when app1 no longer active. I don't love that but it could potentially work, however that PostMessage method is a toggle, rather than a binary switch to suspend or unsuspend, so I see potential for script2 to sometimes accidentally toggle script1's hotkey suspension back on or off when I don't want.
Any other ideas?