Run action in AppleScript package

Use the Run action in macOS based automations to run an AppleScript.

A session name that is associated with an AppleScript is required in order to run it. Therefore, ensure that you have used the Open action to create and link a session name with an AppleScript.
Note: If a linked AppleScript fails, the corresponding automation also fails when deployed.

Settings

  • In the Session name field, enter the name that you have provided in the Open action.

    (Optional) Click Insert a value icon to select a variable or global value that you have stored as a session name.

  • Use the Run with field to select one of the following options:
    • Full script

      To run the entire AppleScript.

    • Specific function

      Use the Function name field to enter the name of the function in the AppleScript that you want to run. (Optional) Click Insert a value icon to select the function name that you have stored as a variable or Global value.

      (Optional) Click the Parameter drop-down menu to select a parameter or click the Create variable icon if you want to create a variable as the parameter.
      Note: Although a single parameter is supported, you can parse multiple parameters of the type string by using Type > List variable.
  • (Optional) Click the Assign the output to variable drop-down menu and select an existing string type variable to store the output value.

    (Optional) Click the Create variable icon if you want to create a variable to store the output.