Run AppleScript / JXA
run_applescriptExecute AppleScript or JavaScript for Automation snippets to control scriptable macOS apps. Requires admin mode and MACCTL_ALLOW_EXEC=true to run.
Instructions
Run an AppleScript (or JavaScript for Automation) snippet via osascript. Powerful — can drive any scriptable app. Requires admin mode AND MACCTL_ALLOW_EXEC=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The AppleScript (or JXA) source. | |
| language | No | Script language. | AppleScript |