"Select menu in…": targeting multiple apps within a single action?

Is there a way to use a regex or something to tell the "Select menu in" action to work with multiple possible target applications?

In my case, I use Adobe Creative Cloud applications, which contains the year as part of the application name. So for example, if I have a macro that selects a menu item in "Adobe Premiere 2025", if the app updates to "Adobe Premiere 2026", I have to go in and manually change the "Select menu in" options in all my Premiere macros to target the new 2026 version of the app.

Because the menu items rarely change in any significant way between Adobe app releases, I'd like to be able to define a wildcard "Select menu in" action that targets any app named "Adobe Premiere *", so I dont have to keep changing the app target every time it gets a major release update.

Is this possible in KM?

Generally Adobe don't change the "bundle ID" between releases, so change the match type to that instead. At the bottom of the application chooser pop-up:

image

I think you only need to do this if you are manually filling in the Menu Title/Item fields -- if you use the "Menu" picker it automatically matches to bundle ID. That doesn't show in the application menu but you see the change in the app name, the short form being used. Compare the following. Typed:

image

...and when set via the "Menu" picker:

image

Tested with InDesign 2024 and 2025, YMMV...

I thought about using Bundle ID, but in the case of Premiere, the bundle ID is different across releases (the current version of Premiere is com.adobe.PremierePro.25), because Adobe allows you to install and run multiple versions of Creative Cloud apps at the same time.

If your target application is always in front when you trigger the macro, you could change the action option to Front Application. And then I think you can use the regex in the text fields as needed.

image

1 Like

Great point. Most people wouldn't use "Select Menu" action unless the app was already in front. That would be very sloppy programming if they did.

Erm... Why?

If you eg

image

...when anything but Finder is frontmost -- Finder is activated, the menu item selected, and activation returned to the original app.

While you'll mostly activate the app then select a menu item, if only because you're also going to do other things in the app at the same time, there's no requirement for it.

And yet InDesign does keep the same bundle ID across versions... So this looks to be a Premiere dev-team thing. I'm sure they have their reasons...

Which brings up a similar problem -- how do you activate the app when the name and bundle ID keeps changing? You're left to do it manually.

I think the best way to do this for Premiere will be to set up a sub-routine whose sole job is to activate Premiere and pause until Premiere is frontmost, so you can bring it to the front as @hemicyon suggests and then use "frontmost app" in your menu item action.

Then, when Premiere gets an update, you only have to make two changes in one macro rather than multiple changes across many.

Not necessarily.

Would the Use Variable action to set front application by name matching work if you can come up with an appropriate regex?

1 Like

Oooh -- I always forget about that action. Nice!

That lets OP take things even further. If they have multiple versions of Premiere installed, swapping between them for different projects, they could use the %Application%All% token to find which version is currently running and target that. Multiple versions running at once? Throw a dialog to choose the target.

1 Like

Me too, but I remembered a topic about future-proofing activate application actions from this kind of variability and rereading it I was reminded of this action.