AppleScript: The Definitive Guide
By Matt Neuburg
November 2003
Pages: 476
ISBN 10: 0-596-00557-1 |
ISBN 13: 9780596005573
![]()
![]()
![]()
![]()
(5) (Average of 3 Customer Reviews)
This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.
The latest edition is also available on Safari Books Online.
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.
Full Description
Register your book | Submit Errata | Examples
Browse within this book
| Table of Contents | Index | Sample Chapter | Colophon
Book details
First Edition: November 2003
ISBN: 0-596-00557-1
Pages: 476
Average Customer Reviews: ![]()
![]()
![]()
![]()
(5) (Based on 3 Reviews)
Featured customer reviews
AppleScript: The Definitive Guide Review, April 02 2004
Totally agree with Diane Love... 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.
Emos
AppleScript: The Definitive Guide Review, January 29 2004
AppleScript The Definitive Guide
By Matt Neuburg
1st Edition November 2003
0-596-00557-1
453 pages, $39.95 US
What the Book is About
This book aims to provide a complete explanatory manual and reference to AppleScript, up to date with Mac OS X 10.3 (Panther).
Target Audience
The introduction states that the book assumes no prior knowledge of AppleScript or of any other programming language. While I agree that no knowledge of AppleScript is required, it's challenging to consider someone with no programming knowledge starting out with this book to use AppleScript as their first programming language. For experienced Applescript users, the book is likely to be an essential reference.
What NOT to Expect
Perhaps like many others who had not used AppleScript, I believed it was a simple, English-like language that was very easy to use. I jumped eagerly in at the first chapter, certain that I would soon be told go sit at my Mac and type my first "Hello World" AppleScript into some application or other.
As I read and read chapter after chapter from the sofa, I realized it was not going to be quite so simple in either case.
AppleScript, according to the author, has come close to extinction in the past, but is now entering a "golden age"; it is a technical innovation and a labor saving device for the ordinary Mac user, yet it's not true to say that it's an intuitive language needing no real explanation.
What to Expect
In reading this book, the author's (Matt Neuburg) expertise in AppleScript becomes immediately apparent. So too does his extremely erudite writing style. For example, when I got to the list of "apothegms" and discovered that this synonym for saying or maxim was dictionary.com's word of the week on June the 9th, 2000, I naturally began to wonder whether he read dictionary.com every week for fun.
As it transpires, the author has degrees in ancient Greek and Classical Philology and had a career as an academic classicist before starting a new career in computing. He thinks computer languages are relatively easy. (See http://www.tidbits.com/matt/).
The trouble with AppleScript is that to use it you have to use it to script an application, each application has a different vocabulary stored in its dictionary, and dictionaries in general have no manuals of their own. If someone tried to write one book that said precisely how to script every application, it would need to contain a dictionary manual for each application, and would therefore be enormous.
While there are books about AppleScript for single applications, Matt Neuburg quite simply wants to get you to see AppleScript through his eyes and learn to use it as he does, finding out what you need to know as you go along.
Part 1 - AppleScript Overview starts by identifying when and why you would want to use AppleScript - for example whenever you get bored doing something very repetitive with your computer. Also discussed in this part of the book are the different environments for creating AppleScripts and some of the important concepts and principles.
The singular feature of this section is that it contains a complete worked example of how to create an AppleScript to do a repetitive document management task. The example uses Framemaker; this has the disadvantage that people who don't have Framemaker won't be able to try it out. The point is to illustrate that no prior knowledge of the Framemaker dictionary is required - you can figure it out for yourself if you know how to ask the application !
Part 2 - The AppleScript Language, is intended as both a reference and instruction. As the author says, "the order of the exposition is pedagogical" - you are supposed to read the chapters in order. This section explains all the language features and illustrates pitfalls including those caused by forgetting AppleScript is not English.
Part 3 - AppleScript in Action, is where, as the author puts it, having learned to use the sword in Part 2, you now go out and do battle. It covers dictionaries, scripting additions, working with applications both scriptable and unscriptable, working with UNIX and finally writing your own applications. Again in this section problems are foreseen and solutions provided.
There are appendices on Apple's "aeut" resource and general AppleScript resources such as websites.
Highlights
The depth of the coverage is amazing and the approach of teaching you how to learn for yourself is refreshing.
If you are interested in linguistics as well as computer languages then this book is a delight. A language manual written by a linguist, it frequently compares and contrasts AppleScript to English and other computer languages.
Mac Guild Grade
A+ (Awesome)
Final Words
If you want to know everything there is to know about AppleScript, then this book is essential.
If on the other hand you are looking for a very practical tutorial or cookbook, be warned that after reading all of this book, I still have not typed any "Hello World" AppleScript into AppleScript Studio. Maybe I just don't do enough boring, repetitive tasks with my Mac.
AppleScript: The Definitive Guide Review, January 12 2004
I've dilly-dallied with AppleScript for years, and everytime given up in frustration. Now that I am half way through this new book, I understand why: its suppose to be like that!
Seriously, if you only by the book for Chapter 3, Matt's own experience in trying to get FrameMaker to do something he needed it to do, it would be worth the price of the book! What you get out of this is that its never going to be easy to get an unknown application (that is, to you!) to do what you want it to do - at least not right away. And he goes on to explain over and over that even though an application may accept Standard Suite events, it may ignore some or all of the parameters you send it! So, I finally found out - its not me - its the system!!!
Now that I understand my expectations are not reset, I have started to again play with Script Editor (on Panther) and scripting various events. I subscribe to the AppleScript users list on the Apple Developer site, and recently there was a thread on how to get a progress bar. Someone posted a script that opened TextEdit, set the window size to a long thin rectangle, send a stream of '|' characters such that it looked like an old style progress bar.
It looked interesting, so I played with it for a while. The script tells TextEdit to open a blank window, then it sets the title, sets the bounds, then starts writing. So, I think - if you could open the window with a title of "Progress..." and a bounds already set, that would be cool. I look in the TextEdit dictionary and there is a "with properties" option under "make new window". So I try it. Sigh. Its compiles, and runs, but TextEdit ignores the properties. Now, before I read Matt's book, I would have thought it was me. Now I know TEXTEDIT IS BROKEN! Not the end of the world, but its not me! I feel better already! [Note: I tested with Tex-Edit Plus, which takes the same make directive but honors the properties! ]
The above is illustrative of the thinking that this book provokes. Matt has a great blend of provoking thought, warning you of pitfalls, and constantly reminding you to experiement as you cannot read how to script a given application in a book, even this one!
I'm only half way through nowl, but am now engaged and feeling good about what I am learning. Matt has a conversational tone, as if you were in a small classroom and looking at one another - so its not another dull tome. He takes you to an amazing depth, slowly while building to it, and when you're done a chapter, and now understand some aspect of AppleScript, you may find yourself smiling that this has happened withour your hardly knowing it was happening.
I've been reading a few chapters each day, then playing around with Script Editor to lock in what I am learning. I have skimmed through the later chapters on occasion to find an answer, and I've always found one.
The only very minor complaint I have is that, for me, it would have been nice to have a small set of questions at end - like exercises - little tasks for the user to try to get them to stop reading and start coding. I find modifying existing example scripts is useful - others may prefer to make some exercises up for themselves.
That said, the buzz on Apple's list server has been extremely positive from a large group of users, some of whom have scripted for years. I personally have several other AppleScript books, and this one is head and shoulders above the rest. If you have any interest at all in using or even understanding AppleScript, you will find this book an invaluable companion. Its even an enjoyable read!
Media reviews
"If you are a serious student or have grounding in other programming languages, it will be hard to find a better guidebook. Unlike Apple's own documentation, Neuburg provides an honest, unprejudiced appraisal of AppleScript's strengths and weaknesses and offers expert guidance in working with and around them...['AppleScript: The Definitive Guide' ] is unquestionably the most comprehensive and unbiased guide to the language ever written. Reading through it is a little like sitting in on a graduate course in AppleScript...if you're willing to sit down and expend the effort to follow the book through, you will be rewarded with the benefits of not only the author's years of programming experience, but his remarkable analytical and problem solving skills."
--Ric Getter, MacDirectory, Spring-Summer '04 (Issue 21)
http://www.macdirectory.com/newmd/mac/pages/REVIEWS/BookReviews-SU04/
"AppleScript is incomprehensible without a guide. REALbasic guru (and frequent RBD contributor) Matt Neuburg comes to the rescue...If you really want to understand the fundamentals or advanced features of the language (like how many 'tell' strucutures you can nest), this is the book for you."
--Marc Zeedar, Real Basic Developer Magazine, July 2004
"A complete and thorough guide...An essential resource for developers and power users."
--Major Keary, PC Update, July 2004
"I highly recommend this book if you are at all interested in learning how to 'automate' your Mac."
--Rob Button, Glenn Macintosh Users Group, April 2004
"...a masterful guide to the language...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...I would recommend it to all Macintosh owners as the perfect way to unleash another powerful aspect of your system...It is certainly the best book on AppleScript I have seen."
Rating: 8/10
--Tony Williams, Slashdot, January 2004
http://slashdot.org/article.pl?sid=04/01/28/1759204
"The depth of the coverage is amazing and the approach of teaching you how to learn for yourself is refreshing. If you are interested in linguistics as well as computer languages then this book is a delight. A language manual written by a linguist, it frequently compares and contrasts AppleScript to English and other computer languages. Mac Guild Grade: A+ (Awesome) If you want to know everything there is to know about AppleScript, then this book is essential."
--Diane Love, The Mac Guild, January 2004
http://mac.excaliburworld.com/reviews/book028.html
"'AppleScript programming is often indistinguishable from guessing' [writes Matt Neuburg]. 'AppleScript: The Definitive Guide' was written to help move guessing to getting answers that get it right and Matt Neuburg even does it with a sense of humor. If you aren't afraid to learn something new and need help moving past the frustration threshold of AppleScripting, get this book. Who knows, you might even create something magically marketable."
--Robert Pritchett, Mac Companion, February 2004
http://www.maccompanion.com/archives/february2004/books.html#2
"An essential resource for developers and power users."
--Major Keary, Book News, January 2004
"AppleScript is touted as easy to learn and use for mere mortals, which is complete baloney...With superior writing and communication skills, ['AppleScript: The Definitive Guide' author] Matt [Neuburg] tackles a monumental job with his typical wealth of wisdom and wit. Reading Neuburgian prose is a delight for this reviewer, and always worthwhile. Im not yet a full-blown scripter, but given enough time and hand-holding by My Man Matt, Im confident to make a valiant stab at it."
--John Nemerovski, mymac.com, December 2003
http://www.mymac.com/showarticle.php?do=something&id=154