If I have no external monitor connected then my Show Status Menu macro works just fine.
With external monitor connected:
If front window is on External monitor, then show status menu opens up the external monitor's status menu.
If front window is on internal display, then when I trigger Show Status Menu, the front window kind of flashes (edges of front window get brighter briefly) and no status menu.
No problem if screens are mirrored.
Any thoughts on what this could be?
The Show Status Menu basically activates the Keyboard Maestro Engine, and then performs a click in the status menu icon, then after that is done it reselects the previously front window.
I tried it on both my primary and external monitor and both worked fine for me.
The “kind of flashes” would be the Keyboard Maestro Engine activating, and then restoring the previous window, so it sounds like the click is failing.
There is actually only one status menu button, even though it appears on both screens by some system magic, so I actually have no idea how the system decides which to click, or why it works for me and not for you.
Do you have Bartender or any other app that mucks around with the menu bar?
I don't really have any suggestions as to how to resolve it, the code for clicking the button is trivial, although there is more complex code around it, so I don't see how there is anything I can tweak to change its behaviour.
Thank you. I do have Bartender, which might be the culprit. Your explanation is really helpful. I now am doing a click on found image action on the screen containing the front window and that seems to work great. Thanks again!
Is there a way to have it keep the focus up in the Status Menu instead of automatically switching focus back to the previously front window? I'm trying to add a simple Action of typing a keystroke to select one of the options from the Status Menu after "Show Status Menu" action but can't figure out how to keep the focus up there...
The clicking action on the status menu is synchronous, so it does not complete until the menu is finished with, and it also locks the engine up while it waits for the menu to be completed, so you cannot do anything after the
Show Status Menu starts until the menu is dismissed.
An alternative might be to simulate a click on the screen which might behave differently.