Synopses & Reviews
If you want to know all about AppleScript--the how, where, and why of using it--dig into AppleScript: The Definitive Guide. It doesn't make the mistake that other books do: it isn't about scripting this or that particular application, and it doesn't assume that learning AppleScript is easy or obvious. Instead, the book teaches and documents the language in a clear and rigorous manner, just as you'd expect with any programming or scripting language.AppleScript is a dynamic, object-oriented scripting system that allows Mac users--even novices who know nothing about programming--to directly control Macintosh applications, including the Mac OS itself. You can write scripts to automate repetitive tasks, customize applications, and even control complex workflows.AppleScript has always been useful, but with Mac OS X it's even more so. Nearly every application that comes with Mac OS X is scriptable. Even non-scriptable applications can often be driven with AppleScript, thanks to the new Accessibility API and GUI Scripting technologies. And now AppleScripters can put a true Aqua interface around their scripts! There's never been a more exciting time for AppleScript users.AppleScript: The Definitive Guide explores and teaches the language from the ground up. If you're a beginner and want to learn how to write your first script or just understand what the excitement is all about, you'll be able to do so after reading this book.AppleScript: The Definitive Guide is the quintessential guide to this important Mac tool. Regardless of their level of experience, AppleScripters everywhere will turn to this book again and again.
Synopsis
AppleScript has always been useful, but with Mac OS X it's even more so. Nearly every application that comes with Mac OS X is scriptable. Even non-scriptable applications can often be driven with AppleScript, thanks to the new Accessibility API and GUI Scripting technologies. And now AppleScripters can put a true Aqua interface around their scripts! There's never been a more exciting time for AppleScript users. "AppleScript: The Definitive Guide explores and teaches the language from the ground up. If you're a beginner and want to learn how to write your first script or just understand what the excitement is all about, you'll be able to do so after reading this book. You'll also learn how to interpret dictionary files, use coercions to streamline scripts, debug and troubleshoot scripts, and more. The book also covers using AppleScript and the new Script Editor, released as part of the new version of Mac OS X, 10.3 (Panther). Experienced AppleScripters will love having the most definitive, up-to-date AppleScript language reference available.
About the Author
Matt Neuburg started programming computers in 1968, when he was 14 years old, as a member of a literally underground high school club, which met once a week to do timesharing on a bank of PDP-10s by way of primitive teletype machines. He also occasionally used Princeton University's IBM-360/67, but gave it up in frustration when one day he dropped his punch cards. He majored in Greek at Swarthmore College, and received his Ph.D. from Cornell University in 1981, writing his doctoral dissertation (about Aeschylus) on a mainframe. He proceeded to teach Classical languages, literature, and culture at many well-known institutions of higher learning, most of which now disavow knowledge of his existence, and to publish numerous scholarly articles unlikely to interest anyone. Meanwhile he obtained an Apple IIc and became hopelessly hooked on computers again, migrating to a Macintosh in 1990. He wrote some educational and utility freeware, became an early regular contributor to the online journal TidBITS, and in 1995 left academe to edit MacTech Magazine. He is also the author of Frontier: The Definitive Guide and REALbasic: The Definitive Guide. In August 1996 he became a freelancer, which means he has been looking for work ever since. He is the author of Frontier: The Definitive Guide and REALbasic: The Definitive Guide, both for O'Reilly & Associates.
Table of Contents
Preface; The Scope of This Book; Versions; How This Book Is Organized; Conventions Used in This Book; How to Contact Us; Acknowledgments; AppleScript Overview; Chapter 1: Ways to Use AppleScript; 1.1 The Nature and Purpose of AppleScript; 1.2 Is This Application Scriptable?; 1.3 Calculation and Repetition; 1.4 Reduction; 1.5 Customization; 1.6 Combining Specialties; Chapter 2: Places to Use AppleScript; 2.1 Script Editor; 2.2 Scripting Environment; 2.3 Internally Scriptable Application; 2.4 Script Runner; 2.5 Automatic Location; 2.6 Application; 2.7 Unix; Chapter 3: The AppleScript Experience; 3.1 The Problem; 3.2 A Day in the Life; 3.3 Conclusions, Lessons, and Advice; Chapter 4: Basic Concepts; 4.1 Apple Event; 4.2 The Open Scripting Architecture; 4.3 Script; 4.4 Compiling and Decompiling; 4.5 Script Text File; 4.6 Applet and Droplet; 4.7 Scripting Addition; 4.8 Dictionary; 4.9 Scriptable, Recordable, Attachable; The AppleScript Language; Chapter 5: Introducing AppleScript; 5.1 A "Little Language"; 5.2 Extensibility and Its Perils; 5.3 The "English-likeness" Monster; 5.4 Object-likeness; 5.5 LISP-likeness; 5.6 The Learning Curve; Chapter 6: Syntactic Ground of Being; 6.1 Lines; 6.2 Result; 6.3 Comments; 6.4 Abbreviations and Synonyms; 6.5 Blocks; 6.6 The; Chapter 7: Variables; 7.1 Assignment and Retrieval; 7.2 Declaration and Definition of Variables; 7.3 Variable Names; 7.4 Scoping of Variables; 7.5 Script Properties; 7.6 Lifetime of Variables; Chapter 8: Handlers; 8.1 Returned Value; 8.2 Parameters; 8.3 Syntax of Defining and Calling a Handler; 8.4 Pass By Reference; 8.5 Scoping of Handlers; 8.6 Handlers as Values; Chapter 9: Script Objects; 9.1 Scoping of Script Objects; 9.2 Top-Level Entities; 9.3 Script Object's Run Handler; 9.4 Handler Calls; 9.5 Script Objects as Values; 9.6 Compiled Script Files as Script Objects; 9.7 Inheritance; Chapter 10: Objects; 10.1 Class; 10.2 Target; 10.3 Get; 10.4 It; 10.5 Me; 10.6 Properties and Elements; 10.7 Element Specifiers; 10.8 Properties of Multiple References; 10.9 Object String Specifier; Chapter 11: References; 11.1 References as Incantations; 11.2 Creating a Reference; 11.3 Identifying References; 11.4 Dereferencing a Reference; 11.5 Creating References to Local Variables; 11.6 Reference as Parameter; Chapter 12: Control; 12.1 Branching; 12.2 Looping; 12.3 Tell; 12.4 Using Terms From; 12.5 With; 12.6 Considering/Ignoring; 12.7 Errors; 12.8 Second-Level Evaluation; Chapter 13: Datatypes; 13.1 Boolean; 13.2 Integer, Real, and Number; 13.3 Date; 13.4 String; 13.5 Unicode Text; 13.6 Styled Text; 13.7 File; 13.8 Alias; 13.9 Application; 13.10 Machine; 13.11 Data; 13.12 List; 13.13 Record; Chapter 14: Coercions; 14.1 Implicit Coercion; 14.2 Explicit Coercion; 14.3 Boolean Coercions; 14.4 String, Number and Date Coercions; 14.5 File Coercions; 14.6 List Coercions; 14.7 Unit Conversions; Chapter 15: Operators; 15.1 Arithmetic Operators; 15.2 Boolean Operators; 15.3 Comparison Operators; 15.4 Containment Operators; 15.5 Concatenation Operator; 15.6 Parentheses; 15.7 Who Performs an Operation; Chapter 16: Global Properties; 16.1 Strings; 16.2 Numbers; 16.3 Miscellaneous; Chapter 17: Constants; Chapter 18: Commands; 18.1 Application Commands; 18.2 Logging Commands; AppleScript In Action; Chapter 19: Dictionaries; 19.1 Resolution of Terminology; 19.2 Resolution Difficulties; 19.3 What's in a Dictionary; 19.4 The 'aeut' Resource; 19.5 Inadequacies of the Dictionary; Chapter 20: Scripting Additions; 20.1 Pros and Cons of Scripting Additions; 20.2 Scripting Additions and Speed; 20.3 Classic Scripting Additions; 20.4 Loading Scripting Additions; 20.5 Standard Scripting Addition Commands; Chapter 21: Scriptable Applications; 21.1 Targeting Scriptable Applications; 21.2 Some Scriptable Applications; Chapter 22: Unscriptable Applications; 22.1 Getting Started with Accessibility; 22.2 GUI Scripting Examples; Chapter 23: Unix; 23.1 Do Shell Script; 23.2 Osascript; Chapter 24: Writing Applications; 24.1 Applets; 24.2 Digital Hub Scripting; 24.3 Folder Actions; 24.4 CGI Application; 24.5 AppleScript Studio; Appendixes; The 'aeut' Resource; Tools and Resources; Scripting Software; Other Software Mentioned in This Book; Apple Documentation; Portals, Instruction, and Repositories; Mailing Lists; Books; Unix Scripting; Colophon;