AppleScript Language Guide

Peter Kitson

ISBN : 0201407353

Order a printed copy of this book from Amazon.

Cover Design - AppleScript Language Guide

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From AppleScript Language Guide
     Copyright © Apple Computer, Inc.

Overview of AppleScript

AppleScript is a dynamic, object-oriented scripting language. Its key feature is the ability to send commands to objects in many different applications, including the Mac OS itself. An object is an item, such as a file or folder in a Finder window, a word or paragraph in a text-editing application, or a shape in a drawing application, that can respond to commands by performing actions. AppleScript determines dynamically that is, whenever necessary which objects and commands an application recognizes based on information stored in each scriptable application.

In addition to manipulating objects in other applications, AppleScript can store and manipulate its own data, called values. Values are simple data structures, such as character strings and real numbers, that can be represented in scripts and manipulated with operators. Values can be obtained from applications or created in scripts.

The building blocks of scripts are statements. When you write a script, you compose statements that describe the actions you want to perform. AppleScript provides several kinds of statements that allow you to control when and how statements are executed. These include If statements for conditional execution, Repeat statements for statements that are repeated, and handler definitions for creating user-defined commands.