Help, please, interpreting Peter's instructions on app menu items

Peter gives four options for forcing an app to update its menus at TIP: How to Ensure App Menu Items are Available

I must be thick in the head today, because I can't figure out precisely what some of it means I should do.

My goal: To have KM select a sub-item in Adobe Lightroom's file menu.

Here are Peters suggestions, and my confusion about each...

  1. Switch out and back to the application, and then use the Select Menu Item action.

I think this means I should have KM active, then click on Lightroom, then click on KM again and see it the menu items are listed in the Select Menu Item's "Menu" pop-up. I did this and it still wasn't showing all the file menu items.

  1. Use the Show Menu variant (leave the item field blank) of the Select Menu Item action to show the menu item first, and then the Select Menu Item.

I don't see a "Select Menu Item" action, just "Select or Show a Menu Item." And when I load that action into the editor, I don't see a Show Menu variant (whatever "variant" means). It just says "Show Menu "" in the Front Application." Does that mean I should click the "Select menu in..." popup? But that's just a list of apps. There is nothing in the popup called "Show Menu."

Exactly what am I supposed to click in the action editor?

  1. Simulate a click in the menu bar, and then use the Select Menu Item action.

Does "Simulate a click in the menu bar" mean to make a KM macro that simulates a mouse click in the Lightroom menu bar? Is it a separate macro or another action in this macro I'm trying to make? Then run that macro from Lightroom and go back to KM see if the menu's been updated? How is that different from manually clicking on the menu bar, as in Option 1?

What does "use the Select Menu Item action" mean? Run it or try to edit it?

  1. Desperate measures, simulate a click in the menu bar, and then use arrows and typeahead (Insert Text by Typing) to select the menu item.

I think I understand this brute force option... but of course it's a last resort!

Sorry for being so dense. I guess I really need it to be spelled out...

Regards,
Russell

I agree his statement is not very clear.

"Variant" means an alternate version of the named Action. Many of KM's Actions can have more than one version (variant). So in the case of the generic Select or Show a Menu Item action can either "Show a Menu", or "Select a Menu Item":

His point is that by first Showing the main menu, it will force the App to generate a dynamic menu item.

I think what he means is to use the Move or Click Mouse action to actually click on the main menu ("View" in my above screen shot) instead of using the "Show Menu".
Personally I would be very surprised if this produced a different result, but if "Show Menu" is NOT giving you the desired Menu Item, then you could always try it.

So, the process would be something like this:

Let's assume (incorrectly) for the moment that BBEdit does a dynamic display of the "Get Info" menu item.
Then you would insert a Pause between the "Show Menu" and "Select Menu Item":

image

This would give BBEdit the time needed to generate the menu item.

Make sense?

You are not dense. This is a difficult concept to understand, and the instructions need to be clearer. :wink:

1 Like

0.5 seconds is a long pause - but, in my automation too, it sometimes has to be that long. (And, depending on system conditions, even that long might occasionally not be long enough.)

I wonder if we could do with/have a “pause until menu item available” action.

Thanks for the quick response. I'll try your suggestions tonight!

Best,
Russell

this one? it exists
image

1 Like

Thank you all for your help. JMichaelTX's clarification worked!

1 Like

Thanks @hello. I didn’t know that. I think it would be ideal here.

One small problem, though: If the menu item appears in the wrong menu then it could fail. (I doubt “Copy” is one of these cases.)

@MartinPacker select a menu item that is unique to that particular app, or at least different enough

1 Like

Thanks, Martin.

A proxy menu item. I don’t disagree but this would be a matter of luck.

1 Like