| | Copyright |
| | Preface |
|
| | The Scope of This Book |
|
| | Versions |
|
| | How This Book Is Organized |
|
| | Conventions Used in This Book |
|
| | How to Contact Us |
|
| | Acknowledgments |
|
| |
Part I:
AppleScript Overview |
|
| |
Chapter 1.
Ways to Use AppleScript |
|
| |
Section 1.1.
The Nature and Purpose of AppleScript |
|
| |
Section 1.2.
Is This Application Scriptable? |
|
| |
Section 1.3.
Calculation and Repetition |
|
| |
Section 1.4.
Reduction |
|
| |
Section 1.5.
Customization |
|
| |
Section 1.6.
Combining Specialties |
|
|
| |
Chapter 2.
Places to Use AppleScript |
|
| |
Section 2.1.
Script Editor |
|
| |
Section 2.2.
Scripting Environment |
|
| |
Section 2.3.
Internally Scriptable Application |
|
| |
Section 2.4.
Script Runner |
|
| |
Section 2.5.
Automatic Location |
|
| |
Section 2.6.
Application |
|
| |
Section 2.7.
Unix |
|
|
| |
Chapter 3.
The AppleScript Experience |
|
| |
Section 3.1.
The Problem |
|
| |
Section 3.2.
A Day in the Life |
|
| |
Section 3.3.
Conclusions, Lessons, and Advice |
|
|
| |
Chapter 4.
Basic Concepts |
|
| |
Section 4.1.
Apple Event |
|
| |
Section 4.2.
The Open Scripting Architecture |
|
| |
Section 4.3.
Script |
|
| |
Section 4.4.
Compiling and Decompiling |
|
| |
Section 4.5.
Script Text File |
|
| |
Section 4.6.
Applet and Droplet |
|
| |
Section 4.7.
Scripting Addition |
|
| |
Section 4.8.
Dictionary |
|
| |
Section 4.9.
Scriptable, Recordable, Attachable |
|
|
| |
Part II:
The AppleScript Language |
|
| |
Chapter 5.
Introducing AppleScript |
|
| |
Section 5.1.
A "Little Language" |
|
| |
Section 5.2.
Extensibility and Its Perils |
|
| |
Section 5.3.
The "English-likeness" Monster |
|
| |
Section 5.4.
Object-likeness |
|
| |
Section 5.5.
LISP-likeness |
|
| |
Section 5.6.
The Learning Curve |
|
|
| |
Chapter 6.
Syntactic Ground of Being |
|
| |
Section 6.1.
Lines |
|
| |
Section 6.2.
Result |
|
| |
Section 6.3.
Comments |
|
| |
Section 6.4.
Abbreviations and Synonyms |
|
| |
Section 6.5.
Blocks |
|
| |
Section 6.6.
The |
|
|
| |
Chapter 7.
Variables |
|
| |
Section 7.1.
Assignment and Retrieval |
|
| |
Section 7.2.
Declaration and Definition of Variables |
|
| |
Section 7.3.
Variable Names |
|
| |
Section 7.4.
Scoping of Variables |
|
| |
Section 7.5.
Script Properties |
|
| |
Section 7.6.
Lifetime of Variables |
|
|
| |
Chapter 8.
Handlers |
|
| |
Section 8.1.
Returned Value |
|
| |
Section 8.2.
Parameters |
|
| |
Section 8.3.
Syntax of Defining and Calling a Handler |
|
| |
Section 8.4.
Pass By Reference |
|
| |
Section 8.5.
Scoping of Handlers |
|
| |
Section 8.6.
Handlers as Values |
|
|
| |
Chapter 9.
Script Objects |
|
| |
Section 9.1.
Scoping of Script Objects |
|
| |
Section 9.2.
Top-Level Entities |
|
| |
Section 9.3.
Script Object's Run Handler |
|
| |
Section 9.4.
Handler Calls |
|
| |
Section 9.5.
Script Objects as Values |
|
| |
Section 9.6.
Compiled Script Files as Script Objects |
|
| |
Section 9.7.
Inheritance |
|
|
| |
Chapter 10.
Objects |
|
| |
Section 10.1.
Class |
|
| |
Section 10.2.
Target |
|
| |
Section 10.3.
Get |
|
| |
Section 10.4.
It |
|
| |
Section 10.5.
Me |
|
| |
Section 10.6.
Properties and Elements |
|
| |
Section 10.7.
Element Specifiers |
|
| |
Section 10.8.
Properties of Multiple References |
|
| |
Section 10.9.
Object String Specifier |
|
|
| |
Chapter 11.
References |
|
| |
Section 11.1.
References as Incantations |
|
| |
Section 11.2.
Creating a Reference |
|
| |
Section 11.3.
Identifying References |
|
| |
Section 11.4.
Dereferencing a Reference |
|
| |
Section 11.5.
Creating References to Local Variables |
|
| |
Section 11.6.
Reference as Parameter |
|
|
| |
Chapter 12.
Control |
|
| |
Section 12.1.
Branching |
|
| |
Section 12.2.
Looping |
|
| |
Section 12.3.
Tell |
|
| |
Section 12.4.
Using Terms From |
|
| |
Section 12.5.
With |
|
| |
Section 12.6.
Considering/Ignoring |
|
| |
Section 12.7.
Errors |
|
| |
Section 12.8.
Second-Level Evaluation |
|
|
| |
Chapter 13.
Datatypes |
|
| |
Section 13.1.
Boolean |
|
| |
Section 13.2.
Integer, Real, and Number |
|
| |
Section 13.3.
Date |
|
| |
Section 13.4.
String |
|
| |
Section 13.5.
Unicode Text |
|
| |
Section 13.6.
Styled Text |
|
| |
Section 13.7.
File |
|
| |
Section 13.8.
Alias |
|
| |
Section 13.9.
Application |
|
| |
Section 13.10.
Machine |
|
| |
Section 13.11.
Data |
|
| |
Section 13.12.
List |
|
| |
Section 13.13.
Record |
|
|
| |
Chapter 14.
Coercions |
|
| |
Section 14.1.
Implicit Coercion |
|
| |
Section 14.2.
Explicit Coercion |
|
| |
Section 14.3.
Boolean Coercions |
|
| |
Section 14.4.
String, Number and Date Coercions |
|
| |
Section 14.5.
File Coercions |
|
| |
Section 14.6.
List Coercions |
|
| |
Section 14.7.
Unit Conversions |
|
|
| |
Chapter 15.
Operators |
|
| |
Section 15.1.
Arithmetic Operators |
|
| |
Section 15.2.
Boolean Operators |
|
| |
Section 15.3.
Comparison Operators |
|
| |
Section 15.4.
Containment Operators |
|
| |
Section 15.5.
Concatenation Operator |
|
| |
Section 15.6.
Parentheses |
|
| |
Section 15.7.
Who Performs an Operation |
|
|
| |
Chapter 16.
Global Properties |
|
| |
Section 16.1.
Strings |
|
| |
Section 16.2.
Numbers |
|
| |
Section 16.3.
Miscellaneous |
|
|
| |
Chapter 17.
Constants |
|
| | true, false |
|
| | yes, no, ask |
|
| | missing value |
|
| | null |
|
| | plain, bold, italic, outline, shadow, underline, superscript, subscript, strikethrough, small caps, all caps, all lowercase, condensed, expanded, hidden |
|
| | case, diacriticals, white space, hyphens, expansion, punctuation |
|
| | application responses |
|
| | current application |
|
| | Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday |
|
| | January, February, March, April, May, June, July, August, September, October, November, December |
|
|
| |
Chapter 18.
Commands |
|
| |
Section 18.1.
Application Commands |
|
| |
Section 18.2.
Logging Commands |
|
|
| |
Part III:
AppleScript In Action |
|
| |
Chapter 19.
Dictionaries |
|
| |
Section 19.1.
Resolution of Terminology |
|
| |
Section 19.2.
Resolution Difficulties |
|
| |
Section 19.3.
What's in a Dictionary |
|
| |
Section 19.4.
The 'aeut' Resource |
|
| |
Section 19.5.
Inadequacies of the Dictionary |
|
|
| |
Chapter 20.
Scripting Additions |
|
| |
Section 20.1.
Pros and Cons of Scripting Additions |
|
| |
Section 20.2.
Scripting Additions and Speed |
|
| |
Section 20.3.
Classic Scripting Additions |
|
| |
Section 20.4.
Loading Scripting Additions |
|
| |
Section 20.5.
Standard Scripting Addition Commands |
|
|
| |
Chapter 21.
Scriptable Applications |
|
| |
Section 21.1.
Targeting Scriptable Applications |
|
| |
Section 21.2.
Some Scriptable Applications |
|
|
| |
Chapter 22.
Unscriptable Applications |
|
| |
Section 22.1.
Getting Started with Accessibility |
|
| |
Section 22.2.
GUI Scripting Examples |
|
|
| |
Chapter 23.
Unix |
|
| |
Section 23.1.
Do Shell Script |
|
| |
Section 23.2.
Osascript |
|
|
| |
Chapter 24.
Writing Applications |
|
| |
Section 24.1.
Applets |
|
| |
Section 24.2.
Digital Hub Scripting |
|
| |
Section 24.3.
Folder Actions |
|
| |
Section 24.4.
CGI Application |
|
| |
Section 24.5.
AppleScript Studio |
|
|
| |
Part IV:
Appendixes |
|
| |
Appendix A.
The 'aeut' Resource |
|
| |
Appendix B.
Tools and Resources |
|
| |
Section B.1.
Scripting Software |
|
| |
Section B.2.
Other Software Mentioned in This Book |
|
| |
Section B.3.
Apple Documentation |
|
| |
Section B.4.
Portals, Instruction, and Repositories |
|
| |
Section B.5.
Mailing Lists |
|
| |
Section B.6.
Books |
|
| |
Section B.7.
Unix Scripting |
|
|
| | Colophon |
| | Index |