I tend to think in scripted solutions, so I forgot this task is easy to do with a Keyboard Maestro native solution.
Download: Get Bundle ID of Front Application v1.00.kmmacros (6.4 KB)
Macro-Image
Macro-Notes
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
System Information
- macOS 10.14.6
- Keyboard Maestro v10.2