Language Guide

CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
10 Special Features of AppleScript
Although everyone can run scripts, not everyone needs to write them. One
person who is familiar with a scripting language can create sophisticated
scripts that many people can use. For example, management information
specialists in a business can write scripts for everyone in the business to use.
Scripts are also sold commercially, included with applications, and distributed
through electronic bulletin boards and user groups.
Special Features of AppleScript 1
AppleScript has a number of features that set it apart from both macro
programs and scripting languages that control a single program:
AppleScript makes it easy to refer to data within applications. Scripts can
use familiar names to refer to familiar objects. For example, a script can refer
to paragraph, word, and character objects in a word-processing document
and to row, column, and cell objects in a spreadsheet.
You can control several applications from a single script. Although many
applications include built-in scripting or macro languages, most of these
languages work for only one application. In contrast, you can use AppleScript
to control any of the applications that support it. You don’t have to learn a
new language for each application.
You can write scripts that control applications on more than one computer. A
single script can control any number of applications, and the applications
can be on any computer on a given network.
You can create scripts by recording. The Script Editor application includes a
recording mechanism that takes much of the work out of creating scripts.
When recording is turned on, you can perform actions in a recordable
application and the Script Editor creates corresponding instructions in the
AppleScript language. To learn how to turn recording on and off, refer to
Getting Started With AppleScript.
AppleScript supports multiple dialects, or representations of the AppleScript
language that resemble various human languages and programming
languages. This guide describes the AppleScript English dialect. You can use
Script Editor to convert a script from one dialect to another without
changing what happens when you run the script.