AppleScript: The Definitive Guide, Second Edition
Scripting and Automating Your Mac
By
Matt Neuburg
January 2006
Pages: 590
| Table of Contents
| Index
| Sample Chapter
Table of Contents
-
AppleScript Overview
-
Chapter 1 Why to Use AppleScript
- The Nature and Purpose of AppleScript
- Is This Application Scriptable?
- Calculation and Repetition
- Reduction
- Customization
- Combining Specialties
-
Chapter 2 Where to Use AppleScript
- Script Editor
- Internally Scriptable Application
- Script Runner
- Automatic Location
- Application
- Unix
- Hyperlinks
- AutomatorworkflowAutomator
Automator
AppleScriptplaces for usingAutomator
-
Chapter 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
-
The AppleScript Language
-
Chapter 4 Introducing the Language
- A Little Language
- Extensibility and Its Perils
- The "English-likeness" Monster
- Object-likeness
- LISP-likeness
- The Learning Curve
-
Chapter 5 Syntactic Ground of Being
- Lines
- Result
- Comments
- Abbreviations and Synonyms
- Blocks
- The
-
Chapter 6 A Map of the World
- Scope Blocks
- Levels and Nesting
- The Top Level
- Code and the Run Handler
- Variables
-
Chapter 7 Variables
- Assignment and Retrieval
- Declaration and Definition of Variables
- Variable Names
-
Chapter 8 Script Objects
- Script Object Definition
- Run Handler
- Script Properties
- Script Objects as Values
- Top-Level Entities
- Compiled Script Files as Script Objects
- Inheritance
-
Chapter 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
-
Chapter 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
-
Chapter 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
-
Chapter 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
-
Chapter 13 Datatypes
- Application
- Machine
- Data
- Boolean
- Integer, Real, and Number
- Date
- String
- Unicode Text
- File and Alias
- List
- Record
-
Chapter 14 Coercions
- Implicit Coercion
- Explicit Coercion
- Boolean Coercions
- Number, String, and Date Coercions
- File Coercions
- List Coercions
- Unit Conversions
-
Chapter 15 Operators
- Implicit Coercion
- Arithmetic Operators
- Boolean Operators
- Comparison Operators
- Containment Operators
- Concatenation Operator
- Parentheses
- Who Performs an Operation
-
Chapter 16 Global Properties
- Strings
- Numbers
- Miscellaneous
-
Chapter 17 Constants
-
Chapter 18 Commands
- Application Commands
- Standard Commands
- Logging Commands
-
Chapter 19 Control
- Branching
- Looping
- Tell
- Using Terms From
- With
- Considering/Ignoring
- Errors
- Second-Level Evaluation
-
AppleScript In Action
-
Chapter 20 Dictionaries
- Resolution of Terminology
- Terminology Clash
- Nonsensical Apple Events
- Raw Four-Letter Codes
- Multiple-Word Terms
- What's in a Dictionary
- The 'aeutaeut
' Resource
- Inadequacies of the Dictionary
-
Chapter 21 Scripting Additions
- Pros and Cons of Scripting Additions
- Classic Scripting Additions
- Loading Scripting Additions
- Standard Scripting Addition Commands
-
Chapter 22 Speed
- Tools of the Trade
- Apple Events
- List Access
- Scripting Additions
- Context
-
Chapter 23 Scriptable Applications
- Targeting Scriptable Applications
- Some Scriptable Applications
-
Chapter 24 Unscriptable Applications
- Historical Perspective
- Getting Started with Accessibility
- GUI Scripting Examples
-
Chapter 25 Unix
- Do Shell Script
- Osascript
-
Chapter 26 Triggering Scripts Automatically
- Digital Hub Scripting
- Folder Actions
- CGI Application
- Timers, Hooks, Attachability, Observability
-
Chapter 27 Writing Applications
- Applets
- AppleScript Studio
- Cocoa Scripting
- AppleScript Studio Scriptability
-
Appendixes
-
Appendix A The AppleScript Experience
- The Problem
- A Day in the Life
- Conclusions, Lessons, and Advice
-
Appendix B Apple Events Without AppleScript
- Pure Raw Apple Events
- JavaScript
- UserTalk
- Perl
- Python
-
Appendix C Tools and Resources
- Scripting Software and Tools
- Scriptable Software
- AppleScript Documentation
- Writing a Scripting Addition
- Writing a Scriptable Application
- Portals, Instruction, and Repositories
- Mailing Lists
- Books
- Unix Scripting
-
Colophon
Return to AppleScript: The Definitive Guide