AppleScript
Maintenanceby Apple Inc. · Language · also known as osascript, Script Editor
Apple's English-like scripting language that drives scriptable macOS applications through Apple events, run from Script Editor, osascript or other automation tools
Overview
AppleScript is Apple's scripting language for controlling scriptable Macintosh applications and parts of macOS. Introduced in 1993 and still included in every macOS release, it sends Apple events, the inter-application messages of the Mac, to applications such as Finder, Mail, Safari, Numbers or any third-party app that publishes a scripting dictionary. The language has a small core and an English-like syntax; most vocabulary comes from the terminology each application defines.
Scripts are written and tested in the bundled Script Editor, run from the command line with osascript (which also executes JavaScript for Automation), embedded in Automator and Shortcuts steps, or triggered by tools like Keyboard Maestro and Hammerspoon. GUI scripting through System Events can click menus and buttons in apps that lack a dictionary, subject to Accessibility permission.
Apple's AppleScript Language Guide lives in the Documentation Archive and was last revised in 2016, and the language has seen few changes since; it is best treated as stable, maintained infrastructure. Its verbose syntax, inconsistent application dictionaries and macOS-only scope are the usual complaints.
Capabilities
- Control of scriptable applications via Apple events
- GUI scripting through System Events and Accessibility
- Command-line execution with osascript
- Embedding in Automator, Shortcuts and third-party automation tools
- Script bundles and applets with persistent properties
Typical workflows
- Export data from Numbers or Mail on a schedule
- Automate a legacy app that has no API but has a scripting dictionary
- Call AppleScript from a shell or Python script via osascript
Strengths
- Available on every Mac without installation
- Deep hooks into Apple's own apps
- Works from any tool that can shell out
Limitations
- macOS only
- Verbose, idiosyncratic syntax and uneven app dictionaries
- Official documentation is archived and dated
Prerequisites
- macOS
- Automation and Accessibility permissions for target apps
Who it is for
- Mac power users and administrators
- Developers gluing macOS apps into pipelines
Alternatives & comparison
- Automator
Apple's long-standing drag-and-drop workflow builder for macOS that produces apps, Quick Actions, folder actions and calendar-triggered automations
ProprietaryFree - cliclick
Small open-source macOS command-line tool that emulates mouse clicks, drags, movements, key presses and typing for scripted GUI control
Open sourceOpen source - Hammerspoon
Open-source macOS automation app that exposes system APIs to a Lua configuration file for hotkeys, window management and event-driven scripts
Open sourceOpen source - Python
General-purpose, dynamically typed programming language with a large standard library and the dominant ecosystem for data science and machine learning
Open sourceOpen source - Shortcuts
Apple's built-in visual automation app for macOS, iOS and iPadOS that chains app actions, scripts and system functions into runnable shortcuts
ProprietaryFree
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Official documentationAppleScript Overviewchecked Nov 1, 2026
https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptX/AppleScriptX.html
Supports: capabilities
- Official documentationScript Editor User Guidechecked Nov 1, 2026
https://support.apple.com/guide/script-editor/welcome/mac
Supports: capabilities, integrations
- Official siteAppleScript Language Guide – Introductionchecked Nov 1, 2026
https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
Supports: name, summary, description
Documentation Archive; updated 2016
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in macOS automation
launchd
Apple Inc. · macOS automation
macOS's built-in service manager that starts, supervises and schedules daemons and per-user agents from property-list job definitions
Alfred
Running with Crayons Ltd · macOS system utilities
macOS launcher and productivity app whose paid Powerpack adds workflows, clipboard history, snippets and custom searches
Karabiner-Elements
pqrs.org (Takayama Fumihiko) · macOS system utilities
Free, public-domain keyboard customizer for macOS that remaps keys and defines complex modifications through JSON rules at the driver level
Keyboard Maestro
Stairways Software Pty Ltd · macOS automation
Commercial macOS macro application that runs sequences of actions from hotkeys, typed strings, application, time, device and system triggers
Raycast
Raycast Technologies Ltd · macOS system utilities
Extensible launcher for macOS (with Windows and iOS versions) combining app search, clipboard history, snippets, window management and a store of community extensions
cliclick
Carsten Blüm (BlueM) · macOS automation
Small open-source macOS command-line tool that emulates mouse clicks, drags, movements, key presses and typing for scripted GUI control