AppleScript in a Nutshell is the first complete reference to AppleScript, the popular programming language that gives both power users and sophisticated enterprise customers the important ability to automate repetitive tasks and customize applications. As the Macintosh continues to expand and solidify its base in the multimedia and publishing industries, AppleScript is the tool of choice on this platform for creating sophisticated time- and money-saving workflow applications (applets). These applets automate the processing and management of digital video, imaging, print, and web-based material. AppleScript is also gaining a foothold in scientific programming, as technical organizations adopt G4 CPU-based systems for advanced computing and scientific analysis. Finally, "power users" and script novices will find that AppleScript is a great everyday Mac programming tool, similar to Perl on Windows NT or Unix.In this well-organized and concise reference, AppleScript programmers will find:
Detailed coverage of AppleScript Version 1.4 and beyond on Mac OS 9 and Mac OS X.
Complete descriptions of AppleScript language features, such as data types, flow-control statements, functions, object-oriented features (script objects and libraries), and other syntactical elements.
Descriptions and hundreds of code samples on programming the various "scriptable" system components, such as the Finder, File Sharing, File Exchange, Network scripting, Web scripting, Apple System Profiler, the ColorSync program, and the numerous powerful language extensions called "osax" or scripting additions.Most other AppleScript books are hopelessly out of date. AppleScript in a Nutshell covers the latest updates and improvements with practical, easy to understand tips, including:
Using AppleScript as a tool for distributed computing, an exciting development that Apple Computer calls "program linking over IP." Programmers can now do distributed computing with Macs over TCP/IP networks, including controlling remote applications with AppleScript and calling AppleScript methods on code libraries that are located on other machines.
Using the Sherlock find application to automate web and network searching.
Insights on scripting new Apple technologies such as Apple Data Detectors, Folder Actions, Keychain Access, and Apple Verifier.AppleScript in a Nutshell is a high-end handbook at a low-end price--an essential desktop reference that puts the full power of this user-friendly programming language into every AppleScript user's hands.
Introduction to AppleScript
Chapter 1 AppleScript: An Introduction
How Is AppleScript Used?
Using Script Runner with OS X
Using OSA Menu with OS 9
Checking Your AppleScript Version
Chapter 2 Using Script Editor with OS 9 and OS X
Script Editor Controls/Commands
Scripting the Script Editor
AppleScript Language Reference
Chapter 3 Data Types
Chapter 4 Operators
Chapter 5 Reference Forms
Chapter 6 Variables and Constants
Constants and Predefined Variables
Chapter 7 Flow-Control Statements
Chapter 8 Subroutines
Subroutines with Positional Parameters
Subroutines with Labeled Parameters
Chapter 9 Script Objects and Libraries
Scripting Mac OS 9 Applications
Chapter 10 Apple Guide and Help Viewer
Chapter 11 Apple System Profiler
Chapter 12 Keychain Scripting and Apple Verifier
Chapter 13 Desktop Printer Manager
Chapter 14 Mac OS 9 Finder Commands
Example Finder Scripts
Chapter 15 Mac OS 9 Finder Classes
Chapter 16 Network Setup Scripting
Chapter 17 Scripting Sherlock 2
Chapter 18 URL Access Scripting
Scripting Mac OS 9 Control Panels and Extensions
Chapter 19 Appearance Control Panel
Chapter 20 Apple Data Detectors Extension
Chapter 21 Apple Menu Options Control Panel
Chapter 22 Application Switcher Extension
Chapter 23 ColorSync Extension
Chapter 24 File Exchange Control Panel
Chapter 25 File Sharing Control Panel
Chapter 26 Folder Actions Extension
Chapter 27 FontSync Control Panel and Extension
Chapter 28 Location Manager Control Panel
Chapter 29 Memory and Mouse Control Panels
Chapter 30 Speech Listener and SpeakableItems Extension
Chapter 31 Web Sharing Control Panel
Scripting the Mac OS X System
Chapter 32 Scripting the OS X Desktop
Working with Files, Folders, Disks, and Windows in OS X
Chapter 33 Scripting Mail
Setting Up an Email Message
Exploring the Mail Application Object
Getting Information about an Email Account
Chapter 34 Executing Scripts with the Terminal App
Bruce W. Perry is an independent software developer and writer, and the author of O'Reilly's Java Servlet & JSP Cookbook and Ajax Hacks. Since 1996, he has developed web applications and databases for various nonprofits, design and marketing firms, as well as publishers. In his spare time, Perry is an active age-group triathlete and has cycled extensively in the Swiss Alps. He splits his time between Warren, Vermont and the Newburyport, Massachusetts area with his wife Stacy LeBaron, daughter Rachel, and son Scott.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The dog on the cover of AppleScript in a Nutshell is a Boston terrier. The youngest breed in the American Kennel Club (AKC), the Boston is a cross between various types of bulldogs and bull terriers. Originally bred in England, the breed stabilized in the United States, where it was initially favored as a fighter in the underworld rat pits of the seedier areas of late eighteenth- and early nineteenth-century Boston. By the late nineteenth century, however, people started to admire the beauty of the breed's compact, elegant build—the "American Gentleman," as the Boston terrier is now known, had been discovered.In 1889, the AKC rejected the Stud Book applications put forth by the "American bull terrier" owners only to accept the breed in 1893 under its new name, Boston terrier. Today, its gentle yet playful and protective nature combined with its willingness to be trained make it a popular family pet-especially, of course, in Boston, the metropolitan area in which O'Reilly maintains a large editorial and production staff. Though the Boston terrier's fighting days are in its past, the sportsmen and women at Boston University evoke the breed's heritage each time they take the field or ice. Catherine Morris was the production editor and copyeditor, and Matt Hutchinson was the proofreader for AppleScript in a Nutshell. Linley Dolby, Colleen Gorman, and Claire Cloutier provided quality control. Interior composition was done by Catherine Morris, Edith Shapiro, and Sada Preisch. Nancy Crumpton wrote the index.Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original illustration created by Susan Hart. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.Melanie Wang designed the interior layout based on a series design by Nancy Priest. Anne-Marie Vaduva converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond Book. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Sarah Jane Shangraw.
For those who've been waiting, O'Reilly will be releasing a new AppleScript book in November 2004. The title is "AppleScript: The Definitive Guide" and it is written by Matt Neuburg. The book goes way more in-depth on AppleScript than the old Nutshell book.
I know AppleScript has loosely defined commands but this book does little to provide the "Quick Reference" promised on the cover.
There is no real attempt to descibe the language in the book and - inexcusable for a reference book - the index is next useless (I suspect it was machine compiled. I suspect that with a proper index that had been checked an proofed it might be a better book .As it is it gathers dust.
The only excuse for owning this is that it is one of the few AS books around.
Save your money - look for tutorial online. You'll learn more that way.
However it is wonderfully matched with its subject matter. Applescript is idiosyncratic and incomplete, and so is the book. So perhaps the author did the best job he that could be done, and his book may qualify as the least-worst book on Applescript.
I rated it average, because it makes the 'average mistakes' that pervade programming books. Starting with Example 1-1 which doesn't work, through many other examples that don't, to the incomplete specification of important functions. I eventually found the Errata web page that confirmed that the examples don't work, but I have yet to find any complete specification of the baroque language.
For example 'filespec' is an important datatype apprarently essential to creating a file. The book gives no specification of how to create one, except in one special case that it repeated in many examples, which don't work (see Errata, again). And important though it is, it does not rate an entry in the index.
Finally the last paragragh of the book describes an intriguing class that represents a Web Page, but gives not a clue of how you can use it.
You are welcome to use these comments for marketing purposes :-)
I own many ORA "Nutshell" books and this falls WAY off the mark. The structure of the book is horrible. The examples are useless and trying to find an answer to simple questions is a farce.
Try determining if an AppleScript variable can be used as a array. Using the book, try to read a list of files into a array and print them out. You won't be able to determine how to do this because there is no command definition and usage for the command "set" in the book. This is atypical of an ORA Nutshell book.
Part III, Part IV & Part V are useless to anyone who wants to create productive scripts. It is 265 pages of filler that is useless unless you want to write parlor tricks!
There is no section that breaks down every command in the language and presents it like the other Nutshell books.