We have published several different versions of an app. They have similar names – Foo Basic, Foo Deluxe, Foo Retro, etc. Similar but different bundle identifiers too. (It wasn't my idea!) Some users have more than one of these apps installed, but only one can be running.
All apps support the same AppleScript dictionary. I need an AppleScript to script the currently-running version of our app to do stuff. How can I do this?
I got it working. It required several pieces:
processes
ofSystem Events
or elsedo shell script "ps …"
, whichever you think will be more reliable in your situation.Here is some code. The script I'm working on has not yet resorted to System Events, so to spare new users the pain of a trip to System Preferences, I chose to use /bin/ps instead…