So I have some apps* that load application specific profiles whenever it detects that a certain other app is focused. Most often I just have to point to the target's
/Applications and the application will be identified whenever it acquires focus.
For some target apps** this doesn't work. Most notably some games from GOG.com that are running in emulators. Despite having their individual
.app in the applications folder they don't seem to identify as that app when running. For instance, if I add the game's official launcher (found in Launchpad after installation) to Dock and launch the game, a new icon spawns in Dock, with an identical name to the original launcher's, that represent the running app. The pinned launcher does not have an indicator (dot) next to it showing that it's running. This leads me to believe that not even Dock identifies them as the same app.
Is there a general method to determine what file to target, in order to get these kinds of focus sensitive apps to identify games correctly, or as close as possible (e.g. identifying all Boxer or ScummVM games as the same is fine)? For instance looking up the PID of the running app in the system monitor and identifying its identity, so to speak.
* Logitech Control Center, Logitech Gaming Software, F.lux
** E.g. GOG's SimCity 2000