I, too, am dealing with Adobe's bad habit of renaming Photoshop each year (Photoshop 2020, Photoshop 2021, etc.).
The procedure employing the "use variable to set the front application by name" at Advice on Future-Proofing Activate Application Actions? will bring the app to the front if it's already running, but for me, it doesn't launch the app if it's not running.
My macros need to launch Photoshop if it's not running. Is there a way to do that with variables?
Alternatively, could I just remove the year from the Photoshop app's filename, or is there more going on under the hood than I realize?
This is my approach to this. (In the example I used a local variable just to show it works, but you would make your own variable, called what you like).
This approach is not only good for launching Apps but it also works to unminimize Apps that have been minimized.
Oh, and you could get more sophisticated by making just the "2022" parts of the file path a variable. But that would assume Adobe never change the rest of the path
EXAMPLE Launch Photoshop via Variable.kmmacros (1.9 KB)
Look at the app's bundle-id, and see if it remains the same.
Run this from the Terminal.app:
mdls -name kMDItemCFBundleIdentifier "$(mdfind -onlyin /Applications 'kMDItemDisplayName == "Adobe Photoshop*.app"c')"
If the bundle-id renames the same then the fix is super easy – if not then a little tinkering will be required.
As @ccstone suggests, select Match by Bundle ID in the applications menu :
By selecting Match by Bundle ID, all Photoshops will be supported regardless of the version.
Thanks. I've also started looking at the Bunch app, which may simplify app opening and closing for my various contexts.