Activate Application with partial name

I have these macros that activate and hit menus in an application that includes the year in the application name, meaning every year I have to go an update these macros to the current version of the application, which is a bit of a pain. Is there a way I can at least activate an app using just the name without the date?

Screenshot 2025-03-18 at 10.23.36

I was looking at this post but I'm trying to avoid installing an additional tool to do this since I hand out this macro to colleagues and want to minimize additional setup: Activate Application by Name String

You could try using the Use Variable action with the front application by name containing option. For the menu, you could try Select menu in Front Application.

3 Likes

If the bundle identifier doesn't change, you might use it to activate the app instead of the path or default. The Select or Show a Menu Item action has this option too, I believe.

activate by bundle id

I couldn't figure out how the Bundle ID works

Me neither. Fortunately, as soon as soon as you choose the option Keyboard Maestro gets the bundle identifier and sets the Match option to BundleIdentier and that's that. If you want to peek under the hood ever so slightly to verify, right click the gear option, copy as xml, paste to TextEdit and you'll be able see that KM has fetched the id and given the Match key a value of BundleIdentifier.

Once you update your app and your machine associates it with the bundle id, which for most apps doesn't change, KM is good to go.

bundle id

1 Like

This is also handy when you need a bundle ID:
function bundleID() {osascript -e "id of app \"${@}\"" }

3 Likes