As Scripts become larger and larger, you can divide your Macro Scripts in individual parts and execute them together. Let’s Create a Macro Script which performs certain Actions and launch it from another Script with the help of Launch and Wait Action. The Launch and Wait Action executes an Application or Opens a Document with appropriate Software and waits for it to be completed and then executes the Next Macro Action.
Yes you can even pass parameters to an Application launched with this Launch and Wait Action as displayed in the above Screenshot. To Execute a Macro Script from a Script, follow the given below steps:
- Create your initial Script and save it to any appropriate Location.
- Now create another Script from which you want to launch the Script created in Step 1 above.
- In this Second Script add a Launch & Wait Action
- Double Click on the newly added Launch & Wait Action and select the Script file created in Step 1 above.
- Now when you execute the Second Script, it will execute the First Script and then it will execute the Actions in the Second Script.
The Screenshot displays Second Script which has few Actions along with Launch & Wait Action to execute the first Macro Script. Note that File Path of First Script has been specified in the Comment Field and is done automatically when the Application or File is selected for the Launch & Wait Macro Action.