DX – Opener and Closer
Sidecar Application Launcher & Closer
This example demonstrates how to reliably open and close external applications from within Isadora using two Pythoner-based User Actors:
-
DX Sidecar Opener — launches an external program (EXE or APP), returns process details, and re-focuses Isadora.
-
DX Sidecar Closer — terminates that same program safely, using a precise cross-platform “fingerprint.”
This provides a clean, repeatable way to integrate sidecar tools such as Processing sketches, OpenFrameworks apps, Python utilities, or other helper programs into an Isadora workflow.
What This Example Includes
DX PY Opener
-
Uses a Isadora Globals (with an ID tag) to save the fingerprint from the opening process
DX PY Closer
- Uses the same Globals ID to receive the fingerprint (PID + create time + bundle ID/PFN) to close the same instance of the app that was opened — even if another instance of that program is already running.
Important Notes for macOS Users
Automation Permissions Required
On macOS, the first time you run this example:
🔒 The OS will prompt you to give Isadora permission to control other applications.
You must approve this in System Settings → Privacy & Security → Automation.
This permission allows the Pythoner actor to:
-
Bring Isadora back into focus
-
Minimize or manage external app windows
-
Politely request an app to quit via AppleScript
If you deny permission, the Opener/Closer may not work properly.
Why IDs and Process “Fingerprints” Matter
Applications can behave unpredictably:
-
Some spawn helper processes
-
Some relaunch in the background
-
Some create multiple windows or sub-instances
-
Some may reuse a PID after closing
To handle this safely, the scripts combine:
-
PID
-
Creation Time
-
Bundle ID / Package Family Name (platform dependent)
-
Executable path normalization
Together, these form a stable identity that ensures the Closer actor terminates the exact same process the Opener launched — not a different instance.
Limitations to Be Aware Of
This method is robust, but some types of apps may behave inconsistently:
Applications with multiple windows
Some macOS apps relaunch helper processes or switch the “frontmost process,” which may change the PID unexpectedly.
UWP/MSIX apps on Windows
Some modern Windows apps (like Calculator or Photos) spawn short-lived launcher processes that immediately hand off control to another PID.
In these cases, PFN detection works when possible, but some apps still cannot be closed reliably.
Apps that block termination
If an app ignores polite quit requests, forced termination may be required.
Apps requiring special permissions
macOS sandboxed apps may offer limited scriptability.
For typical sidecar tools (Processing, OpenFrameworks, Max, Python EXEs), behavior is consistent.
Open file with application
This project does not yet include the ability to open a specific file with a host application. The target application you wish to open must be an executable file. This is perfectly suited to tools such as my Kinect2Share (which I have tested with on Windows). Projects created in environments like processing.org and Max Msp will need to have the project exported as an executable.
How to Use This Example
-
To get started you will need to setup your Python environment. Scene one of the project includes an Easy Setup tool that should get you setup in a minute or two.
-
This project must reside in a folder as it was distributed. The file structure of this project is important.
- Once your environment is setup, you will need to close Isadora, and re-open the project to be able to use the Opener and Closer user actors.
Why This Is Useful
This approach enables advanced cross-application workflows such as:
-
Launching a Processing or OpenFrameworks visual generator from Isadora
-
Managing multi-tool pipelines for LED control, tracking, or visuals
-
Remote-launching helper apps during live shows or installations
-
Ensuring sidecar apps start minimized and never steal focus
Log in to Reply
You must be logged in to post a comment.