Bug with Menu condition?


Peter, I'm using 8.2.4 and seem to have a single quirky bug that I've been wanting to show you for a long time. The screenshot below demonstrates that the hide/show-actions toggle macro works as long as the first conditional statement is:

'If any of the following are true: "a menu item with the name matching 'Hide Actions' is enabled" execute "Hide Actions".

If you look at screenshots 1, 2, 3 and 4, (going clock wise), each time I enable the macro, the first conditional statement changes from true to false or from false to true.

But: if I create the same macro using "Show Actions" in the first conditional statement, the first conditional statement remains 'TRUE,' whether it's true or false, rendering the macro ineffective.

The screen shots below were taken at various stages of the 'Show Actions' macro. The first was taken when the first conditional statement is in fact true; in other words, when Actions are hidden and 'Show Actions' is an enabled menu item. So, when "Show Actions' is a menu item, this macro works.

But note the two screens at the very end of this post. The first was taken 5 minutes after Actions displayed and the last screenshot was taken over 10 minutes after Actions displayed. In both cases, 'Show Actions' disappeared and Hide Actions replaced it. And yet, the first conditional statement - "If any of the following are true: "a menu item with the name matching 'Show Actions' is enabled' - is still (incorrectly) labelled 'True', thus rendering this macro ineffective when Actions are displayed (and 'Show Actions disappears).


A Single Bug: Last Screenshot

Hopefully, the screen will show here.



It is always nice to think it is a bug, but in this case it is not a bug.

Change it from “with name matching” to “with this name” and I bet it works properly.

Alternatively, try renaming your macro so it does not contain the phrase “Show Actions”, the macro it probably showing up in the View ➤ Select Macro menu.

When you know the explicit path of the menu (in this case View➤Show Actions) it is better to use the “with path” option.


We're talkin' hours and hours and hours. When I posted the 'bug,' I thought of one avenue I had not checked: That it was a vestige of a sync file. Turns out, there were two culprits: (1) The phrase "Show Actions" was the title of the macro and of other macros as well. I had to nix all phrases with 'Show Actions' and (2) the 'Show' macro requires 'a menu item with this name' while the 'Hide' macro does well with 'a menu item with this name' and 'name matching.' Show doesn't work with 'matching.'

Given that the software was written in Objective C - and also (ahem) there's that small detail, you wrote the software - do you have any tips as to where to look first so that hours, days and weeks aren't devoted to figuring out, how is this not a bug (smile and shrug).

The path part didn't matter. Thank you for the answer!


Its not a bug because there are menu items with names matching “Show Actions” (in the View ➤ Select Macro menu). You presumably don't have (or haven't edited or used recently) macros with “Hide Actions” in their name, hence why it works.


To be clear: I fully get the fact - at least, I do now! - it's not a bug. It took your nudging me in the right direction to find the two culprits (it would be nice to be able to find them on my own), which were (1) the need to use 'a menu item with this name' (vs the matching name statement and (2) removing the 'Show Actions' phrase from everywhere.

That's all I was trying to say. Thx again...


In the Help menu, type “Show Action” and it will show you all the matching menus.

As I mentioned, using the “with path” is better in all cases where you know the menu resides at a particular menu location (“View ➤ Select Macro” in this case) because then Keyboard Maestro does not have to search through all the menus in the application looking for it, and there is less change of getting the wrong menu. With some applications with large and/or dynamic menu structures, this may make a large difference in performance of the action.