| help | account  


AppleScript: The Definitive Guide, 2nd Edition
View Larger Image
Matt Neuburg
O'Reilly Media, Paperback, 2nd edition, Published January 2006, 560 pages, ISBN 0596102119
List Price: $39.99
Our Price: $24.95
You Save: $15.04 (38% Off)


FREE Shipping on Orders over $40!*
Availability: Out-Of-Stock

Be the First to Write a Review and tell the world about this title!

People who purchase this book frequently purchase:

Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:

Mac users everywhere--even those who know nothing about programming--are discovering the value of the latest version of AppleScript, Apple's vastly improved scripting language for Mac OS X Tiger. And with this new edition of the top-selling AppleScript: The Definitive Guide, anyone, regardless of your level of experience, can learn to use AppleScript to make your Mac time more efficient and more enjoyable by automating repetitive tasks, customizing applications, and even controlling complex workflows.

Fully revised and updated--and with more and better examples than ever--AppleScript: The Definitive Guide, 2nd Edition explores AppleScript 1.10 from the ground up. You will learn how AppleScript works and how to use it in a variety of contexts: in everyday scripts to process automation, in CGI scripts for developing applications in Cocoa, or in combination with other scripting languages like Perl and Ruby.

AppleScript has shipped with every Mac since System 7 in 1991, and its ease of use and English-friendly dialect are highly appealing to most Mac fans. Novices, developers, and everyone in between who wants to know how, where, and why to use AppleScript will find AppleScript: The Definitive Guide, 2nd Edition to be the most complete source on the subject available. It's as perfect for beginners who want to write their first script as it is for experienced users who need a definitive reference close at hand.

AppleScript: The Definitive Guide, 2nd Edition begins with a relevant and useful AppleScript overview and then gets quickly to the language itself; when you have a good handle on that, you get to see AppleScript in action, and learn how to put it into action for you. An entirely new chapter shows developers how to make your Mac applications scriptable, and how to give them that Mac OS X look and feel with AppleScript Studio. Thorough appendixes deliver additional tools and resources you won't find anywhere else. Reviewed and approved by Apple, this indispensable guide carries the ADC (Apple Developer Connection) logo.

 

Table of Contents

Preface

Part I. AppleScript Overview

1. Why to Use AppleScript
     The Nature and Purpose of AppleScript
     Is This Application Scriptable?
     Calculation and Repetition
     Reduction
     Customization
     Combining Specialties

2. Where to Use AppleScript
     Script Editor
     Internally Scriptable Application
     Script Runner
     Automatic Location
     Application
     Unix
     Hyperlinks
     Automator

3. Basic Concepts
     Apple Events
     The Open Scripting Architecture
     Script
     Compiling and Decompiling
     Compiled Script Files
     Script Text File
     Applet and Droplet
     Scripting Addition
     Dictionary
     Missing External Referents
     Modes of Scriptability

Part II. The AppleScript Language

4. Introducing the Language
     A Little Language
     Extensibility and Its Perils
     The "English-likeness" Monster
     Object-likeness
     LISP-likeness
     The Learning Curve

5. Syntactic Ground of Being
     Lines
     Result
     Comments
     Abbreviations and Synonyms
     Blocks
     The

6. A Map of the World
     Scope Blocks
     Levels and Nesting
     The Top Level
     Code and the Run Handler
     Variables

7. Variables
     Assignment and Retrieval
     Declaration and Definition of Variables
     Variable Names

8. Script Objects
     Script Object Definition
     Run Handler
     Script Properties
     Script Objects as Values
     Top-Level Entities
     Compiled Script Files as Script Objects
     Inheritance

9. Handlers
     Handler Definition
     Returned Value
     Handlers as Values
     Parameters
     Pass by Reference
     Syntax of Defining and Calling a Handler
     Event Handlers
     The Run Handler
     Recursion
     Power Handler Tricks

10. Scope
     Regions of Scope
     Kinds of Variable
     Scope of Top-Level Entities
     Scope of Locals
     Scope of Globals
     Scope of Undeclared Variables
     Declare Your Variables
     Free Variables
     Redeclaration of Variables
     Closures

11. Objects
     Messages
     Attributes
     Class
     Target
     Get
     It
     Me
     Properties and Elements
     Element Specifiers
     Operations on Multiple References
     Assignment of Multiple Attributes
     Object String Specifier

12. References
     Reference as Target
     Reference as Incantation
     Creating a Reference
     Identifying References
     Dereferencing a Reference
     Trouble with Contents
     Creating References to Variables
     Reference as Parameter

13. Datatypes
     Application
     Machine
     Data
     Boolean
     Integer, Real, and Number
     Date
     String
     Unicode Text
     File and Alias
     List
     Record

14. Coercions
     Implicit Coercion
     Explicit Coercion
     Boolean Coercions
     Number, String, and Date Coercions
     File Coercions
     List Coercions
     Unit Conversions

15. Operators
     Implicit Coercion
     Arithmetic Operators
     Boolean Operators
     Comparison Operators
     Containment Operators
     Concatenation Operator
     Parentheses
     Who Performs an Operation

16. Global Properties
     Strings
     Numbers
     Miscellaneous

17. Constants

18. Commands
     Application Commands
     Standard Commands
     Logging Commands

19. Control
     Branching
     Looping
     Tell
     Using Terms From
     With
     Considering/Ignoring
     Errors
     Second-Level Evaluation

Part III. AppleScript In Action

20. Dictionaries
     Resolution of Terminology
     Terminology Clash
     Nonsensical Apple Events
     Raw Four-Letter Codes
     Multiple-Word Terms
     What's in a Dictionary
     The 'aeut' Resource
     Inadequacies of the Dictionary

21. Scripting Additions
     Pros and Cons of Scripting Additions
     Classic Scripting Additions
     Loading Scripting Additions
     Standard Scripting Addition Commands

22. Speed
     Tools of the Trade
     Apple Events
     List Access
     Scripting Additions
     Context

23. Scriptable Applications
     Targeting Scriptable Applications
     Some Scriptable Applications

24. Unscriptable Applications
     Historical Perspective
     Getting Started with Accessibility
     GUI Scripting Examples

25. Unix
     Do Shell Script
     Osascript

26. Triggering Scripts Automatically
     Digital Hub Scripting
     Folder Actions
     CGI Application
     Timers, Hooks, Attachability, Observability

27. Writing Applications
     Applets
     AppleScript Studio
     Cocoa Scripting
     AppleScript Studio Scriptability

Part IV. Appendixes

A. The AppleScript Experience

B. Apple Events Without AppleScript

C. Tools and Resources

Index

 

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 time-sharing 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. In August 1996 he became a freelancer, which means he has been looking for work ever since.

He is the author of AppleScript: The Definitive Guide REALbasic: The Definitive Guide and Frontier: The Definitive Guide all from O'Reilly Media, Inc..




Forgot your password?
FAQs
Shipping Options
Returns
Your Orders
Your Account