Apple Script Language Guide
Apple Script Language Guide
Game Manuals · PDF
| Filename | AppleScriptLanguageGuide.pdf |
|---|---|
| Size | 2.40 MB |
| Subsection | Apple Script Language |
| Downloads | 0 |
Enjoying MacTrove?
Anonymous downloads are free and unlimited.
Create a free account to track favorites,
contribute metadata corrections, and join the
community chat.
Reader
Loading…
OCR / Text contents
AppleScript Language Guide
Contents
Introduction to AppleScript Language Guide 12
What Is AppleScript? 12
Who Should Read This Document? 13
Organization of This Document 13
Conventions Used in This Guide 14
See Also 15
AppleScript Lexical Conventions 16
Character Set 16
Identifiers 17
Keywords 17
Comments 19
The Continuation Character 19
Literals and Constants 20
Boolean 20
Constant 20
List 20
Number 20
Record 21
Text 21
Operators 21
Variables 22
Expressions 22
Statements 23
Commands 23
Results 24
Raw Codes 24
AppleScript Fundamentals 25
Script Editor Application 25
AppleScript and Objects 27
What Is in a Script Object 27
Properties 28
Elements 29
2008-03-11 | © 2008 Apple Inc. All Rights Reserved.
2
Contents
Object Specifiers 29
What Is in an Object Specifier 30
Containers 31
Absolute and Relative Object Specifiers 31
Object Specifiers in Reference Objects 32
Coercion (Object Conversion) 33
Scripting Additions 36
Commands Overview 37
Types of Commands 37
Target 38
Direct Parameter 38
Parameters That Specify Locations 39
AppleScript Error Handling 39
Global Constants in AppleScript 40
AppleScript Constant 40
current application Constant 43
missing value Constant 44
true, false Constants 44
The it and me Keywords 44
Aliases and Files 46
Specifying Paths 46
Working With Aliases 47
Working With Files 48
Remote Applications 49
Enabling Remote Applications 49
eppc-Style Specifiers 49
Targeting Remote Applications 50
Debugging AppleScript Scripts 51
Feedback From Your Script 51
Logging 51
Third Party Debuggers 52
Variables and Properties 53
Defining Properties 53
Declaring Variables 54
Local Variables 54
Global Variables 55
Using the copy and set Commands 56
Scope of Variables and Properties 59
2008-03-11 | © 2008 Apple Inc. All Rights Reserved.
3
Contents
Scope of Properties and Variables Declared in a Script Object 60
Scope of Variables Declared in a Handler 64
Script Objects 67
Defining Script Objects 67
Initializing Script Objects 69
Sending Commands to Script Objects 70
Inheritance in Script Objects 71
The AppleScript Inheritance Chain 72
Defining Inheritance Through the parent Property 72
Some Examples of Inheritance 73
Using the continue Statement in Script Objects 75
About Handlers 79
Handler Basics 79
Defining a Simple Handler 80
Handlers with Labeled Parameters 81
Handlers with Positional Parameters 82
Handlers with Patterned Positional Parameters 83
Recursive Handlers 84
Errors in Handlers 85
Passing by Reference Versus Passing by Value 85
Calling Handlers in a tell Statement 86
Saving and Loading Libra…
Showing first 3,000 characters of 611,482 total. Open the full document →