UiPath Documentation
activities
latest
false
Productivity activities

Invoke Apple Script

Invoke Apple Script activity that invokes an Apple script and returns its output.

UiPath.AppleScripting.Activities.InvokeAppleScript

Description​

Invokes an Apple script and returns its output.

This activity executes AppleScript code on macOS systems and returns the output. You can provide the script either as inline content or by specifying a file path to a script file. The activity supports timeout configuration and has an option to throw exceptions when the script fails, that is, exits with a non-zero code. AppleScript is a powerful scripting language on macOS that can automate tasks and control applications.

Note:

This package only runs on macOS systems.

Project compatibility​

Windows | Cross-platform

Configuration​

You can configure the activity and its properties as follows:

  • Path to script file - The path of the file which contains the AppleScript to execute.
    • Use content - Select this option to switch to Script content, where you can provide the content of the AppleScript to execute.
  • Script content - The content of the AppleScript to execute.
    • Use local file - Select this option to switch back to Path to script file.
  • Arguments - An ordered list of strings passed as positional arguments to the script's on run argv handler. Every value arrives as AppleScript text; coerce to numbers or booleans inside the script if needed.
Note:
  • The activity supports only the .scpt and .scptd file extensions, and the script (inline content or file) must be 1 MB or smaller.
  • For more details on the plus menu options, check Designing automations.

Properties panel​

  • Throw on fail - Select True or False. By default, this option is set to True. If set to True, the activity throws an exception when the exit code of the script is not 0. The message contained in the exception will be the content of the standard error stream.
  • Timeout (milliseconds) - Specifies the amount of time (milliseconds) to wait for the activity to run before throwing an error. Leave blank to wait indefinitely.
  • Result - The result of the script invocation.
  • Description​
  • Project compatibility​
  • Configuration​
  • Properties panel​

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated