AppleScript
A natural language-inspired scripting language for automating tasks and controlling applications on macOS, using Apple Events for inter-application communication since 1993.
Created by William R. Cook et al., Apple Computer
AppleScript is a scripting language created by Apple for automating tasks and controlling applications on macOS. First released in 1993, it is distinguished by its English-like natural language syntax and its use of Apple Events — an inter-application messaging protocol — to send commands to and receive data from scriptable applications. AppleScript remains the most deeply integrated automation language on macOS, capable of controlling the Finder, Mail, Safari, and hundreds of third-party applications through a unified scripting interface.
History & Origins
Conception and Development
AppleScript originated in 1989 within Apple’s Advanced Technology Group, where an initial project (code-named “Family Farm”) was led by Larry Tesler. After that team was disbanded in mid-1990, the language design and implementation effort was restarted in 1991 under William R. Cook, who served as managing technical lead and principal language designer. Cook, who had completed his PhD at Brown University in 1989, was joined by key contributors including Warren Harris (co-architect and primary implementor), Kurt Piersol (project leader, previously at Xerox working in Smalltalk-80), and Donn Denman (a member of the original Macintosh development team).
The language drew heavily from HyperTalk, the scripting language Dan Winkler created for Bill Atkinson’s HyperCard in 1987. HyperTalk had demonstrated that an English-like scripting language could make programming accessible to non-programmers. Cook’s team set out to extend this natural language approach beyond HyperCard stacks to any application on the Macintosh.
First Release
After a beta release in September 1992, AppleScript 1.0 shipped as a Developer’s Toolkit in April 1993. The first public release came in October 1993 as part of System 7.1.1 (also known as System 7 Pro), which included AppleScript 1.1 along with the Apple Event Manager, Script Editor, and the Open Scripting Architecture (OSA).
The Soghoian Era
In January 1997, Sal Soghoian joined Apple as Product Manager of Automation Technologies. Soghoian became the primary advocate and steward of AppleScript within Apple for nearly two decades, overseeing its evolution through the Mac OS X transition, the introduction of Automator, and the AppleScriptObjC bridge. His position was eliminated in late 2016 (publicly announced in November at the MacTech Conference), a move widely interpreted as Apple reducing its investment in traditional scripting technologies.
Design Philosophy
AppleScript’s design is rooted in two core principles: natural language readability and inter-application communication.
Natural Language Syntax
AppleScript was deliberately designed to read like English prose. Where most programming languages use symbols and terse keywords, AppleScript uses phrases that approximate natural language:
| |
This design choice was intended to make the language accessible to end users and non-programmers who wanted to automate their workflows. The trade-off is that AppleScript’s verbosity can make complex scripts harder to write and maintain compared to more conventional scripting languages.
Apple Events and the Open Scripting Architecture
The technical foundation of AppleScript is the Apple Event — an inter-process communication message that carries commands and data between applications. When an AppleScript sends a command to an application, it constructs an Apple Event that the target application receives and processes.
The Open Scripting Architecture (OSA) provides the framework that makes this possible. OSA is not limited to AppleScript — it defines an interface through which any scripting language can send Apple Events to applications. This architecture enabled Apple to later introduce JavaScript for Automation (JXA) in 2014 as a peer language using the same underlying mechanism.
Each scriptable application publishes an application dictionary (also called a scripting dictionary) that defines the commands it understands and the objects it exposes. Script Editor can browse these dictionaries, allowing script authors to discover what an application supports.
Key Features
Tell Blocks
The tell statement is AppleScript’s primary mechanism for directing commands to a specific application:
| |
Script Objects and Handlers
AppleScript supports handlers (functions) and script objects for code organization and reuse:
| |
Script objects provide encapsulation and a form of inheritance through a parent-child delegation mechanism.
Automatic Coercion
AppleScript’s type system is dynamic with automatic coercion between compatible types. The language will attempt to convert values between types as needed — for example, converting integers to strings for concatenation. Core data types include integer, real, text, boolean, list, record, date, and reference.
Folder Actions
Originally available in Mac OS 9 and reintroduced with Mac OS X 10.2, Folder Actions allow AppleScript scripts to be attached to folders and triggered automatically by file system events such as adding, removing, or opening items.
AppleScriptObjC Bridge
Starting with Mac OS X 10.6 and becoming system-wide in OS X 10.10, the AppleScriptObjC bridge allows AppleScript to call Cocoa framework methods directly, significantly expanding the language’s capabilities beyond what application dictionaries expose.
Evolution
Classic Mac OS (1993-2001)
During the Classic Mac OS era, AppleScript grew steadily. QuarkXPress 3.2 became one of the first major applications to support AppleScript, and the publishing industry’s enthusiastic adoption helped drive the language’s early growth. By the late 1990s, AppleScript had become a standard tool in prepress and desktop publishing workflows.
Transition to Mac OS X (2001-2006)
The transition to Mac OS X required AppleScript to adapt to a fundamentally different operating system architecture. AppleScript 1.6 shipped with Mac OS X 10.0 in 2001. AppleScript Studio, introduced alongside Xcode, allowed developers to build full Mac applications with AppleScript as the primary language. In 2002, Mac OS X 10.2 added Folder Actions and the Script Menu for system-wide script access.
The 2.0 Overhaul (2007)
AppleScript 2.0, released with Mac OS X 10.5 Leopard in October 2007, was the most significant update in the language’s history. It brought full Unicode support, 64-bit compatibility, and substantial performance improvements. This release modernized the language’s internals while maintaining backward compatibility with existing scripts.
Modern Era (2009-2015)
AppleScript 2.1 (2009) deprecated AppleScript Studio in favor of the more flexible AppleScriptObjC bridge, which allowed direct access to Cocoa frameworks. In 2014, Apple introduced JavaScript for Automation (JXA) as an alternative OSA scripting language, giving developers the option to use JavaScript syntax for the same automation tasks. AppleScript 2.8, which shipped with OS X 10.11 El Capitan in 2015, is reportedly the last major version update.
Current Relevance
AppleScript continues to ship with every version of macOS and remains functional for automating applications and system tasks. However, the language has not received a major update since 2015, and Apple has not announced new features or improvements.
Apple’s introduction of the Shortcuts app to macOS in 2021 (macOS 12 Monterey), described by Apple’s Craig Federighi as “the future of automation on the Mac,” signals a strategic shift toward a more visual, cross-platform automation approach. AppleScript has not been deprecated, and Apple has given no indication it will be removed, but active development has effectively ceased.
The AppleScript community remains active but relatively small, centered around forums like MacScripter and Late Night Software’s resources. Many power users and system administrators continue to rely on AppleScript for macOS automation tasks that Shortcuts cannot yet replicate, particularly those involving deep application scripting and complex multi-application workflows.
Why It Matters
AppleScript occupies a unique position in programming language history. It is one of the most successful implementations of the natural language programming concept — the idea that programming languages should resemble human language to be accessible to non-programmers. While this approach has trade-offs (the verbosity that makes simple scripts readable can make complex scripts unwieldy), AppleScript demonstrated that natural language syntax could be practical for real-world automation tasks.
The language also pioneered the concept of system-wide application scripting through a unified protocol. The Apple Events architecture and Open Scripting Architecture provided a model for inter-application communication that allowed users to chain together actions across unrelated applications — a capability that remains distinctive to macOS. No other major operating system offers an equivalent built-in mechanism for scripting arbitrary applications through a shared language.
AppleScript’s three-decade presence on every Mac sold since 1993 makes it one of the longest-lived scripting languages still shipping as a core component of a major operating system. Its influence can be traced through Automator, JavaScript for Automation, and macOS Shortcuts — each representing Apple’s evolving answer to the same question AppleScript first addressed: how to give users the power to automate their computers.
Timeline
Notable Uses & Legacy
Publishing and Prepress Workflows
AppleScript was widely adopted in the publishing industry to automate QuarkXPress, Adobe InDesign, Photoshop, and Illustrator, enabling complex batch processing and production workflows that helped maintain the Mac's dominance in desktop publishing.
macOS System Automation
AppleScript is used to automate Finder operations, file management, batch renaming, and system configuration tasks across macOS, providing users with scriptable access to core operating system functions.
Media and Content Management
Automating iTunes (now Music.app), Photos, and other Apple media applications for library management, playlist generation, metadata editing, and bulk media organization.
Enterprise Workflow Automation
Used in business environments to chain together multi-application workflows — automating sequences across email clients, spreadsheets, databases, and custom applications on macOS.