Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

AppleScript Overview

AppleScript is Apple's powerful and versatile native language scripting technology for Mac OS X. A simple English-like language, AppleScript can control and communicate between applications, databases, networks, Web services, and even the operating system itself. You can make your Macintosh applications scriptable so that users can write scripts to automate operations they would rather not do themselves, from simple tasks to complex workflows involving multiple applications. The award-winning AppleScript Studio enables you to build individual scripts and workflows into rich, functional Aqua-compliant applications, and is useful for rapid prototyping, automated testing, and other kinds of development. Integrated throughout Mac OS X, AppleScript support gives you an easy way to leverage the power of AppleScript-enabled applications, saving you and your users time and money.

AppleScript gains almost all of its power by borrowing the abilities of other applications. By making your applications scriptable, you are giving AppleScript access to your application's functionality. A scriptable application responds to AppleScript messages, or Apple events. Designed for efficiency, an Apple event is a type of high-level message used to send commands and data between processes. Apple events provide the foundation for the underlying communication between scripts and applications, and therefore enabling communication between applications or even over the network.

Mac OS X supplies a number of resources that applications can use to support scripting and working with Apple events, including the API provided in several frameworks. The Apple Event Manager offers an API for sending and receiving Apple events, working with the information they contain, and supplying the underlying support for creating scriptable applications. Together, AppleScript and the Apple Event Manager provide XML-RPC and SOAP (Simple Object Access Protocol) support for exchanging information in a distributed environment. Scripters can make XML-RPC calls and SOAP requests from scripts, while you can make XML-RPC calls and SOAP requests from applications or other code by sending Apple events.

The Carbon and Cocoa frameworks support scripting so that your applications execute scripts or send individual Apple events to take advantage of features in other applications. The Cocoa framework, working through the Application Kit and Foundation frameworks, includes built-in support for standard AppleScript commands, such as getting and setting properties of application objects, minimizing the amount of code you have to write.

The Open Scripting Architecture API provides a standard mechanism for compiling, executing, loading, and storing scripts written in an arbitrary language.

AppleScript Studio is an integrated development environment for creating powerful, Aqua-compliant Mac OS X applications that use AppleScript scripts to control complex user interfaces. This makes AppleScript Studio a useful tool for system administrators or others who need to quickly automate a process while providing a complete user interface for system and application scripts, command-line utilities, and web applications. AppleScript Studio applications are Cocoa applications with additional capabilities provided by the AppleScriptKit framework. You can write AppleScript Studio applications using just AppleScript or a combination of AppleScript and system programming languages, such as C, Objective-C, and Java. As part of the free Xcode suite of development tools, AppleScript Studio takes advantage of a combination of technologies, including AppleScript, Cocoa, Xcode, and Interface Builder, supporting user-interface items such as windows, buttons, text fields, tabs, tables, and progress bars.

AppleScript-aware applications provide powerful AppleScript tools for users, including the Image Events architecture for manipulating images and image-related data. Mac OS X includes the Script Editor for creating and editing scripts, and the Script Menu, a system-wide menu for organizing and running AppleScript, Perl, and Shell scripts.

And with Mac OS X v10.4 Tiger, you can create your own Automator actions using AppleScript.

Thousands of developers have increased the popularity and usefulness of their applications by adding AppleScript support to their products, and with Cocoa and AppleScript Studio it's never been easier. With fully 80% of Apple's top-tier customers using AppleScript to automate their workflow processes, its value as the premier automation technology is tremendous.

For news, updates and links to other ADC content related to AppleScript on Mac OS X, return to the AppleScript topic page.

Updated 2006-02-24