Get and set the SYSTEM-WIDE foreground app / window.
The goal here was to be able to switch to another application without user interaction. Then I added some extra features and explored what is possible if we want to remain cross-platform compatible.
Without any further action on Mac, we can get, set and quit the active app. I called that "basic" functionality. If the Accessibility Api gets enabled for Max (or the app running the external), we can do some more stuff. You will see that in the help patcher tab "advanced". On Windows(OS) there are no restrictions on using "advanced" features.
You have to be careful how and where you use it. Setting the focus to another application is normally only expected to be done manually by the user.
- added method to check if an app is running
- updated main method
- supports Apple Silicon