- Series: Definitive Guides
- Paperback: 480 pages
- Publisher: O'Reilly Media; 1 edition (December 4, 2003)
- Language: English
- ISBN-10: 0596005571
- ISBN-13: 978-0596005573
- Product Dimensions: 7 x 1.2 x 9.2 inches
- Shipping Weight: 1.8 pounds (View shipping rates and policies)
- Average Customer Review: 22 customer reviews
- Amazon Best Sellers Rank: #2,071,631 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
AppleScript: The Definitive Guide (Definitive Guides) 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Customers who viewed this item also viewed
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.
Read reviews that mention
Showing 1-6 of 22 reviews
There was a problem filtering reviews right now. Please try again later.
I found most of the examples to be very confusing and the numerous references to explain certain exceptions and reasons in later chapters to be very frustrating. Perhaps the nature of AppleScript is just confusing so I do not want to fault the author. If you are looking to learn AppleScript as a total beginner, like me, this is not the book for you.
There's a great deal of information on a wide range of topics: the architecture of the language, the mindset you need when coding with AppleScript, how to combine your AppleScripts with other languages (such as Perl), how to use AppleScript studio to create GUI apps, and tons more. /AppleScript: The Definitive Guide/ has an excellent index, and I've yet to encounter a situation when the bit of info I needed couldn't be found quickly in this book.
Ultimately, AppleScript books tend to fall into one of two categories. There are those that are primarily aimed at telling you how to automate specific apps (the Finder, for example) and not much else. Such books are unfortunately too common, and many of them are sorely outdated (usually covering not much after Mac OS 9, which is fairly useless now). At the other end of the spectrum are those that aim to teach you the language, its ups and its downs, its godsends and its bizarre oddities. /AppleScript: The Definitive Guide/ falls into the latter category, and this is its strongest feature.
As the author points out, AppleScript is a very quirky language, and you never really "learn" all of it, or even the majority of it. There's so many hacks and poorly (or un-) documented applications, it would take a lifetime to truly master every aspect of AppleScript. Fortunately Matt Neuburg has come to the rescue with this excellent reference. It surely deserves a place on the bookshelf of any Mac developer or power user.
AppleScript as a language and development environment has some terrible problems, and I applaud Neuburg for not trying to hide them away. Personally I love the power the language can provide, while loathing it for it's "English-like" syntax and the problems inherent in having most of the language defined in differing ways in different applications.
One of Applescript's problems is that it is difficult to teach, as you almost have to understand everything before you can know anything. Unfortunately that problem is reflected in this book. Neuburg constantly finds himself having to resort to the "believe me for now, I'll explain later" strategy throughout the book.
The book is broken up into four sections: "AppleScript Overview," "The AppleScript Language," "AppleScript In Action," and several appendices.
"AppleScript Overview" is a well written look at what AppleScript is, what it is good for and how to use it. Chapter 3, "The AppleScript Experience" is an impressive warts-and-all walk-through of the author developing an AppleScript to solve the problem of renaming files to conform to a particular standard using FrameMaker and the Finder. It is here that the reader will first see the problems inherent with AppleScript as Neuburg battles with incomprehensible dictionaries, unknown object models and uncommunicative error messages to build his script.
Part II, "The Applescript Language," is the 200-page core of this book. Neuburg provides a detailed and comprehensive look at every detail of AppleScript's syntax and semantics. The first chapter of this section, "Introducing AppleScript" contains a marvelous section entitled 'The "English-likeness" Monster' that is a short, sharp (and entirely justified) attack on the problem of AppleScript's attempt to be English-like in syntax.
In the rest of this section Neuburg provides an exceptional survey of the language. I personally appreciated his examination of the intricacies of type coercion and the exotic scoping rules. He has also taken the time to write and elaborate a large number of small pieces of code to demonstrate gotchas and tricks throughout the language.
It is this section that truly separates this book from every other AppleScript book I have previously read -- it is a masterful guide to the language.
Part III is a concrete path towards writing your own scripts. Neuburg starts by examining application dictionaries in depth. The real power of AppleScript lies not in the language itself but in the ability to use language extensions built in to other applications. This also becomes a huge flaw when the only documentation you get is in the application dictionary. As Neuburg puts it "One purpose of the dictionary is to show the human user how to speak AppleScript to a scriptable application in order to drive that application. But a dictionary, by its very nature, is not completely adequate to this task." He then goes on to explain the flaws.
The first appendix is a dump of the AppleScript Suite from AppleScript's 'aeut' resource. This is the core of the language usable everywhere. The second Appendix is a good, useful guide to tools and resources for the AppleScript programmer.
Taken as whole, this is a great book for the AppleScript programmer, both beginner and expert. It has a good writing style, has been well edited and well constructed. Neuburg may be putting in too many forward references, though. Other reviewers, particularly those newer to AppleScript, have called the book frustrating and confusing. I think this may be due to both the high information density in this book and Neuburg's fast introduction to topics that are better explained later in the book. If you are a newcomer to programming and AppleScript then this may be daunting.
If you are new, however, this is still an excellent volume but you may have to force yourself to finish it and then go over at least Part I and II again to truly understand the language. It would probably be a good idea to start trying to build your own scripts after the first read through. I must say, that after taking a good hard look at the way the book has been constructed and ordered I couldn't really come up with a better way that wouldn't have doubled the size of the book.
Visit the O'Reilly web page for the book if you would like to see the Table of Contents or grab an example chapter.
Neuburg has said "My approach is not to rely on documentation, ... but to bang away at the language itself, testing and experimenting, trying to deduce the underlying rules" and this approach has certainly borne fruit in this volume. For all it's minor flaws you cannot say, as may be true of many other tech books, that it is a rewrite of the documentation. He has approached the problem from a different direction and given us a book that offers an excellent guide to the language.
I would recommend it to all Macintosh owners as the perfect way to unleash another powerful aspect of your system. For people who have no AppleScript or programming experience who want to be totally spoon fed this book is probably only a 5/10, for people with a little AppleScript experience, a fair amount of programming experience and a willingness to stick through to the end this book is probably a 9/10. It is certainly the best book on AppleScript I have seen.