AppleScript_ The Definitive Guide - Matt Neuburg [2]
In this light, I have written the AppleScript book that I have for so long myself wished to read. Before writing this book, I always found myself rather confused about AppleScript; I could use it with reasonable effectiveness, but I was always somewhat hazy on the details. So writing this book was first and foremost an opportunity for me to dispel my own confusion. My technique, aside from asking a few experts a lot of questions, has been one of sheer open-ended experimentation; essentially ignoring the Apple manual and the existing books and other expositions that have reproduced its myths and mistakes, I have subjected AppleScript to every test I could think of, trying to work out by empiricism and rational deduction the logic of the "little black box" concealed inside it. The result is a reasoned, rigorous, step-by-step presentation of the AppleScript language, intended for instruction and for reference—a studious, patient, detailed, ordered exposition and compendium of the facts as they really are. This book presents AppleScript as a programmer, a student, and a thinker would learn it. In short, it's just what I've always wanted! This book has helped me tremendously. Before I wrote it, I didn't really quite understand AppleScript; now I believe I do. I hope it will do the same for you.
Versions
Things change. All things change. And software often changes faster than the ability of printed books to keep up with it. It will therefore be useful for the reader to know what versions of software I was looking at when I wrote this edition of the book. The first draft was written using Mac OS X 10.4.2 ("Tiger") and AppleScript 1.10; the book was finished under Mac OS X 10.4.3 and AppleScript 1.10.3. Apple's Script Editor was at version 2.1 (later 2.1.1). Late Night Software's Script Debugger 4 was still in beta. (This means that screen shots of Script Debugger 4 don't quite match the finished product.) There may be further changes in Tiger, and possibly even in AppleScript, by the time the book goes to print, but if so, it seems unlikely that these will affect the book's content; still, the reader should be alert to the possibility of slight discrepancies between what I describe and the now-current state of things.
The book is written entirely from the perspective of Mac OS X. This is a deliberate design decision. There is an important sense in which Mac OS 9 really is frozen, if not downright moribund; very few new applications of any importance are being written for it, it is not likely to evolve further to any significant extent, and Apple has begun to produce computers that won't even boot in it (and will soon move to a system where Classic will not run at all). If you are not using Mac OS X, this book might still be useful to you, but please keep in mind that it isn't geared primarily to your situation.
This second edition is written entirely from the perspective of Tiger. Not much attention has been paid to differences between the Tiger version of AppleScript and earlier versions. Where a feature is new in Tiger, I say so. But if you are still using Panther (or Jaguar), you should stick with the first edition of this book.
How This Book Is Organized
This book is divided