# Invoke Apple Script

> `UiPath.AppleScripting.Activities.InvokeAppleScript`

`UiPath.AppleScripting.Activities.InvokeAppleScript`

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 Apple script to execute.
  + **Use content** - Select this option to switch the initial field to **Script content**, where you can provide the content of the Apple script to execute.
  + **Use Local File** - Select this option to switch back to the initial field. This option is visible only after you select the previous option **Use a File Resource**.

:::note
* The activity supports only the `.scpt` and `.scptd` file extensions.
* For more details on the plus menu options, check [Designing automations](https://docs.uipath.com/studio/standalone/latest/user-guide/designing-automations).
:::

**Properties**
* **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.

**Result** - The result of the script invocation.
