I currently use the following script in order to switch applications with the mouse wheel:
MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab
This allows me to click the mouse wheel, then roll the wheel to select the desired application, then click again to switch to it.
However, there are some applications that require me to click the mouse wheel (i.e. SketchUp in order to orbit).
How can I automatically disable/bypass this set of macros only when the SketchUp application is in the foreground (i.e. the window has the focus)?
According to the official docs, the AltTabMenu function is only valid when paired directly with a hotkey on the same line (i.e. MButton::AltTabMenu), so I can't use WinGetTitle and an IF statement to selectively call AltTabMenu.
Currently I simply disable AutoHotKey when I am using SketchUp, but this gets annoying because my AHK script also contains several other shortcuts/key remappings that I use frequently.
Thanks for any insight.