DekGenius.com
[ Team LiB ] Previous Section Next Section

Preface

From a technological and historical perspective, AppleScript is one of the greatest innovations and distinguishing features of the Mac OS. The System provides not only a mechanism for applications to communicate with one another, ordering one another about, getting information from one another, and generally collaborating to avail themselves of one another's strengths and abilities, but also a way for ordinary users to take advantage of this mechanism programmatically. The user can write and execute code in the AppleScript language as a way of automating the behavior of applications, reducing many steps to one, throwing the burden of repetition and calculation onto the computer, and combining the powers of multiple applications into a seamless united workflow. AppleScript is a labor-saving device that lets ordinary users program the computer for themselves; and, after all, labor-saving and programming are just what computers are all about.

Although AppleScript was long treated by Apple itself as something of an unwanted, troublesome step-child—and has even (according to apocryphal legend) at times come perilously near being tossed onto the scrapheap—it has lately prospered, and is now perhaps entering a kind of Golden Age. AppleScript has been embraced and acknowledged and is starting to take its rightful place in the firmament of Apple's star technologies. It is noticed on Apple's own web pages as a major aspect of Mac OS X (for example, see http://www.apple.com/macosx/overview/). The Script Editor has been rewritten as a Cocoa application. Scripts may be run from a System-wide menu. More and more of Apple's own new applications are scriptable. Integration with Unix scripting has been provided. AppleScript can even be used to drive applications that are not technically scriptable at all. And users can actually write a genuine application with a full-fledged Aqua user interface—windows, menus, buttons, text fields, scrolling lists, and more—using AppleScript as their programming language, thanks to the astounding AppleScript Studio. And it all comes for free as part of Mac OS X.

In this context, with interest in AppleScript waxing anew, the need for a complete explanatory manual and reference is greater than ever. In that spirit, this book is offered. It is hoped that it will prove helpful to AppleScript's beginning and veteran users alike. No prior knowledge of AppleScript is assumed, nor any previous programming experience, so that the complete beginner can use this book to learn AppleScript from the ground up; at the same time, the book aims at such a degree of technical depth and completeness as will satisfy the needs of those who wish only to consult it to check some point of syntax, or to gain a firmer understanding of such advanced arcana as how the scoping rules operate, how terminology is resolved, or what an Apple event really is.

    [ Team LiB ] Previous Section Next Section