Launch a Macro Script from another Macro Script

As scripts become larger and more complex, you can divide your workflow into modular macro scripts and execute them sequentially. Using the Launch & Wait action, a parent script can launch a child macro script file (`.mamc`), wait for its execution to complete, and then continue executing subsequent actions.

Launch and Wait Macro Action to Execute a Script from Another Script
Launch & Wait Macro Action to Execute a Script from Another Script

You can also pass command-line arguments or parameters to applications launched with the Launch & Wait action. To execute one macro script from another, follow these steps:

  1. Create your initial macro script and save it to any folder on your computer.
  2. Create or open the parent script from which you want to launch the initial script.
  3. Add a Launch & Wait action to the parent script.
  4. Double-click the newly added Launch & Wait action row and select your initial script file (`.mamc`).
  5. When you run the parent script, it will execute the child script to completion before continuing with remaining actions in the parent script.
A Macro Script Executing another Script with Launch and Wait Action
Macro Script Executing another Script with Launch & Wait Action

The screenshot above shows a parent macro script containing several actions, including a Launch & Wait action configured to trigger a child macro script. The file path of the child script is automatically logged in the action comment field when selected.