Apple AppleScript Language User Manual

AppleScript Language Guide
English Dialect
Apple Computer, Inc.
© 1996 Apple Computer, Inc. All rights reserved.
No part of this publication or the software described in it may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc.
Printed in the United States of America.
The Apple logo is a trademark of Apple Computer, Inc. Use of the “keyboard” Apple logo (Option­Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws.
No licenses, express or implied, are granted with respect to any of the technology described in this book. Apple retains all intellectual property rights associated with the technology described in this book. This book is intended to assist application developers to develop applications only for Apple Macintosh computers.
Apple Computer, Inc. 20525 Mariani Avenue Cupertino, CA 95014 408-996-1010
Apple, the Apple logo, AppleTalk, HyperCard, HyperTalk, LaserWriter, and Macintosh are trademarks of Apple Computer, Inc., registered in the United States and other countries.
AppleScript, Finder, Geneva and System 7 are trademarks of Apple Computer, Inc.
Adobe Illustrator and PostScript are trademarks of Adobe Systems Incorporated, which may be registered in certain jurisdictions.
FrameMaker is a registered trademark of Frame Technology Corporation.
Helvetica and Palatino are registered trademarks of Linotype Company.
FileMaker is a registered trademark of Claris Corporation.
ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
Microsoft is a registered trademark of Microsoft Corporation.
Simultaneously published in the United States and Canada.
LIMITED WARRANTY ON MEDIA AND REPLACEMENT
If you discover physical defects in the manuals distributed with an Apple product, Apple will replace the manuals at no charge to you, provided you return the item to be replaced with proof of purchase to Apple or an authorized Apple dealer during the 90-day period after you purchased the software. In addition, Apple will replace damaged manuals for as long as the software is included in Apple’s Media Exchange program. See your authorized Apple dealer for program coverage and details. In some countries the replacement period may be different; check with your authorized Apple dealer.
ALL IMPLIED WARRANTIES ON THIS MANUAL, INCLUDING IMPLIED WARRANTIES OF MERCHANTA­BILITY AND FITNESS FOR A PART ICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY (90) DAYS FROM THE DATE OF THE ORIGINAL RETAIL PURCHASE OF THIS PRODUCT.
Even though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, ITS QUALITY, ACCURACY, MERCHANTA­BILITY, OR FITNESS FOR A PARTIC­ULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD “AS IS,” AND YOU, THE PURCHASER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages.
THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.
Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.
Contents
Figures and Tables xiii
Preface About This Guide
Audience xv Organization of This Guide xvi Sample Applications and Scripts xvii For More Information xviii
Getting Started xviii Scripting Additions xviii Other AppleScript Dialects xviii Scriptable Applications xviii
Conventions Used in This Guide xix
Part 1 Introducing AppleScript
xv
1
Chapter 1 AppleScript, Scripts, and Scriptable Applications
What Is AppleScript? 3 What Can You Do With Scripts? 5
Automating Activities 5 Integrating Applications 7
Customizing Applications 7 Who Runs Scripts, and Who Writes Them? 9 Special Features of AppleScript 10 What Applications Are Scriptable? 11
3
iii
Chapter 2 Overview of AppleScript
How Does AppleScript Work? 14 Statements 14 Commands and Objects 17 Dictionaries 18 Values 20 Expressions 21
Operations 21
Variables 22 Script Objects 23 Scripting Additions 23 Dialects 24 Other Features and Language Elements 24
Continuation Characters 25
Comments 26
Identifiers 27
Case Sensitivity 28
Abbreviations 29
Compiling Scripts With the Script Editor 30
13
Part 2 AppleScript Language Reference
Chapter 3 Values
Using Value Class Definitions 33
Literal Expressions 36
Properties 36
Elements 37
Operators 37
Commands Handled 37
Reference Forms 38
Coercions Supported 38
iv
33
31
Value Class Definitions 38
Boolean 40 Class 41 Constant 42 Data 43 Date 43 Integer 47 List 48 Number 52 Real 53 Record 54 Reference 57 String 60 Styled Text 64 Text 66
Coercing Values 67
Chapter 4 Commands
Types of Commands 71
Application Commands 72 AppleScript Commands 73 Scripting Addition Commands 74 User-Defined Commands 76
Using Command Definitions 77
Syntax 78 Parameters 78 Result 79 Examples 79 Errors 79
Using Parameters 80
Parameters That Specify Locations 80 Coercion of Parameters 81
Raw Data in Parameters 81 Using Results 82 Double Angle Brackets in Results and Scripts 83
71
v
Command Definitions 84
Close 87 Copy 88 Count 92 Data Size 97 Delete 98 Duplicate 99 Exists 99 Get 100 Launch 103 Make 105 Move 106 Open 107 Print 108 Quit 109 Run 110 Save 112 Set 113
Chapter 5 Objects and References
Using Object Class Definitions 119
Properties 120 Element Classes 120 Commands Handled 120 Default Value Class Returned 122
References 122
Containers 123 Complete and Partial References 124
Reference Forms 125
Arbitrary Element 126 Every Element 127 Filter 129 ID 130 Index 131 Middle Element 133
vi
119
Name 134
Property 135
Range 136
Relative 139 Using the Filter Reference Form 140 References to Files and Applications 143
References to Files 144
References to Applications 146
References to Local Applications 147 References to Remote Applications 148
Chapter 6 Expressions
Results of Expressions 149 Variables 150
Creating Variables 150
Using Variables 152
The “A Reference To” Operator 153
Data Sharing 154
Scope of Variables 155
Predefined Variables 156 Script Properties 156
Defining Script Properties 157
Using Script Properties 157
Scope of Script Properties 158 AppleScript Properties 158
Text Item Delimiters 158 Reference Expressions 160 Operations 161
Operators That Handle Operands of Various Classes 168
Equal, Is Not Equal To 168 Greater Than, Less Than 172 Starts With, Ends With 173 Contains, Is Contained By 175
Concatenation 177 Operator Precedence 178 Date-Time Arithmetic 180
149
vii
Chapter 7 Control Statements
Characteristics of Control Statements 184 Tell Statements 185
Tell (Simple Statement) 188 Tell (Compound Statement) 189
If Statements 190
If (Simple Statement) 192 If (Compound Statement) 193
Repeat Statements 194
Repeat (forever) 197 Repeat (number) Times 198 Repeat While 199 Repeat Until 200 Repeat With (loopVariable) From (startValue) To (stopValue) 201 Repeat With (loopVariable) In (list) 202 Exit 204
Try Statements 204
Kinds of Errors 205 How Errors Are Handled 206 Writing a Try Statement 206
Try 207
Signaling Errors in Scripts 210
Error 210
Considering and Ignoring Statements 213
Considering/Ignoring 214
With Timeout Statements 217
With Timeout 218
With Transaction Statements 219
With Transaction 219
183
Chapter 8 Handlers
Using Subroutines 221
Types of Subroutines 223 Scope of Subroutine Calls in Tell Statements 224 Checking the Classes of Subroutine Parameters 225
viii
221
Recursive Subroutines 225 Saving and Loading Libraries of Subroutines 226
Subroutine Definitions and Calls 228
Subroutines With Labeled Parameters 229
Subroutine Definition, Labeled Parameters 229
Subroutine Call, Labeled Parameters 230
Examples of Subroutines With Labeled Parameters 232 Subroutines With Positional Parameters 235
Subroutine Definition, Positional Parameters 235
Subroutine Call, Positional Parameters 236
Examples of Subroutines With Positional Parameters 238 The Return Statement 239
Return 240
Command Handlers 241
Command Handler Definition 241
Command Handlers for Script Applications 243
Run Handlers 243 Open Handlers 246 Handlers for Stay-Open Script Applications 247
Idle Handlers 248
Quit Handlers 249
Interrupting a Script Application’s Handlers 250 Calling a Script Application 251
Scope of Script Variables and Properties 252
Scope of Properties and Variables Declared at the Top Level
of a Script 254 Scope of Properties and Variables Declared in a Script Object 258 Scope of Variables Declared in a Handler 263
Chapter 9 Script Objects
About Script Objects 265 Defining Script Objects 267 Sending Commands to Script Objects 268 Initializing Script Objects 269 Inheritance and Delegation 271
265
ix
Defining Inheritance 271 How Inheritance Works 272 The Continue Statement 277 Using Continue Statements to Pass Commands to Applications 280 The Parent Property and the Current Application 281
Using the Copy and Set Commands With Script Objects 283
Appendix A The Language at a Glance
Commands 289 References 294 Operators 296 Control Statements 299 Handlers 301 Script Objects 303 Variable and Property Assignments and Declarations 303 Predefined Variables 304 Constants 305 Placeholders 307
289
Appendix B Scriptable Text Editor Dictionary
About Text Objects 313
Elements of Text Objects 314 Special Properties of Scriptable Text Editor Text Objects 314 Text Styles 315 AppleScript and Non-Roman Script Systems 317
Scriptable Text Editor Object Class Definitions 318
Application 318 Character 321 Document/Window 323 File 328 Insertion Point 329 Paragraph 331 Selection 334 Text 336
313
x
Text Item 339 Text Style Info 341 Window 342 Word 342
Scriptable Text Editor Commands 345
Copy 347 Cut 348 Data Size 349 Duplicate 349 Make 350 Move 351 Open 351 Paste 351 Revert 352 Save 353 Select 354
Scriptable Text Editor Errors 355
Appendix C Error Messages
Operating System Errors 358 Apple Event Errors 359 Apple Event Registry Errors 361 AppleScript Errors 362
Glossary
Index
363
371
357
xi
Figures and Tables
Chapter 1
Chapter 2
Chapter 3
Chapter 4
AppleScript, Scripts, and Scriptable Applications
Figure 1-1 Changing text style with the mouse and with a script 4 Figure 1-2 A script that performs a repetitive action 6 Figure 1-3 A script that copies information from one application to another 8 Figure 1-4 Different ways to run a script 9
Overview of AppleScript
Figure 2-1 How AppleScript works 15 Figure 2-2 How AppleScript gets the Scriptable Text Editor dictionary 20
13
3
Values 33
Figure 3-1 Value class denition for lists 34 Figure 3-2 Coercions supported by AppleScript 69
Table 3-1 AppleScript value class identiers 39
Commands
Figure 4-1 Command denition for the Move command 77 Figure 4-2 The Scriptable Text Editor document “simple” 95
71
Chapter 5
Table 4-1 Standard application commands dened in this chapter 85 Table 4-2 AppleScript commands dened in this chapter 86
Objects and References
Figure 5-1 The Scriptable Text Editor’s object class denition for
paragraph objects 121
Figure 5-2 The Scriptable Text Editor document “simple” 137
Table 5-1 Reference forms 126 Table 5-2 Boolean expressions and tests in Filter references 142
119
xiii
Chapter 6
Expressions
Table 6-1 AppleScript operators 163 Table 6-2 Operator precedence 179
149
Chapter 8
Chapter 9
Appendix A
Handlers
Figure 8-1 Scope of property and variable declarations at the top level
Figure 8-2 Scope of property and variable declarations at the top level
Figure 8-3 Scope of variable declarations within a handler 263
Script Objects
Figure 9-1 Relationship between a simple child script and its parent 273 Figure 9-2 Another child-parent relationship 273 Figure 9-3 A more complicated child-parent relationship 274
The Language at a Glance
Table A-1 Command syntax 290 Table A-2 Reference form syntax 294 Table A-3 Container notation in references 296 Table A-4 Operators 297 Table A-5 Control statements 300 Table A-6 Handler denitions and calls 302 Table A-7 Script objects 303 Table A-8 Assignments and declarations 304 Table A-9 Predened variables 305 Table A-10 Constants dened by AppleScript 305 Table A-11 Placeholders used in syntax descriptions 308
221
of a script 254
of a script object 258
265
289
Appendix B
xiv
Scriptable Text Editor Dictionary
Figure B-1 Bounds and Position properties of a Scriptable Text Editor
window 327
Table B-1 Variations from standard behavior in Scriptable Text Editor versions
of standard application commands 345
Table B-2 Other Scriptable Text Editor commands 347
313
P R E F A C E
About This Guide
The AppleScript Language Guide: English Dialect is a complete guide to the English dialect of the AppleScript language. AppleScript allows you to create sets of written instructions—known as scripts—to automate and customize your applications.
Audience 0
This guide is for anyone who wants to write new scripts or modify existing scripts.
Before using this guide, you should read Getting Started With AppleScript to learn what hardware and software you need to use AppleScript; how to install AppleScript; and how to run, record, and edit scripts.
To make best use of this guide, you should already be familiar with at least one of the following:
another scripting language (such as HyperTalk, the scripting language for HyperCard, or a scripting language for a specific application)
a computer programming language (such as BASIC, Pascal, or C)
a macro language (such as a language used to manipulate spreadsheets)
If you’re not already familiar with the basics of scripting and programming (such as variables, subroutines, and conditional statements such as If-Then), you may want additional information to help you get started. You can find a variety of introductory books on scripting and programming—including books specifically about AppleScript—in many bookstores.
Macintosh software developers who want to create scriptable and recordable applications should refer to Inside Macintosh: Interapplication Communication.
xv
P R E F A C E
Organization of This Guide 0
This guide is divided into two parts:
Part 1, “Introducing AppleScript,” provides an overview of the AppleScript language and the tasks you can perform with it.
Part 2, “AppleScript Language Reference,” provides reference descriptions
of all of the features of the AppleScript language.
Part 1 contains these chapters:
Chapter 1, “AppleScript, Scripts, and Scriptable Applications,” introduces
AppleScript and its capabilities.
Chapter 2, “Overview of AppleScript,” provides an overview of the
elements of the AppleScript language.
Part 2 contains the following chapters:
xvi
Chapter 3, “Values,” describes the classes of data that can be stored and
manipulated in scripts and the coercions you can use to change a value from one class to another.
Chapter 4, “Commands,” describes the types of commands available in
AppleScript, including application commands, AppleScript commands, scripting addition commands, and user-defined commands. It also includes descriptions of all AppleScript commands and standard application commands.
Chapter 5, “Objects and References,” describes objects and their
characteristics and explains how to refer to objects in scripts.
Chapter 6, “Expressions,” describes types of expressions in AppleScript,
how AppleScript evaluates expressions, and operators you use to manipulate values.
P R E F A C E
Chapter 7, “Control Statements,” describes statements that control when and
how other statements are executed. It includes information about Tell, If, and Repeat statements.
Chapter 8, “Handlers,” describes subroutines, command handlers, error
handlers, and the scope of variables and properties in handlers and elsewhere in a script. It includes the syntax for defining and calling subroutines and error handlers.
Chapter 9, “Script Objects,” describes how to define and use script objects. It
includes information about object-oriented programming techniques such as using inheritance and delegation to define groups of related objects.
At the end of the guide are three appendixes, a glossary of AppleScript terms, and an index.
Appendix A, “The Language at a Glance,” is a collection of tables that
summarize the features of the AppleScript language. It is especially useful for experienced programmers who want a quick overview of the language.
Appendix B, “Scriptable Text Editor Dictionary,” defines the words in the
AppleScript language that are understood by the Scriptable Text Editor sample application.
Appendix C, “Error Messages,” lists the error messages returned
by AppleScript.
Sample Applications and Scripts 0
A sample application, the Scriptable Text Editor, is included with AppleScript. The Scriptable Text Editor is scriptable; that is, it understands scripts written in the AppleScript language. It also supports recording of scripts: when you use the Record button in the Script Editor (the application you use to write and modify scripts), the actions you perform in the Scriptable Text Editor generate AppleScript statements for performing those actions. Scripts for performing tasks in the Scriptable Text Editor are used as examples throughout this guide.
xvii
P R E F A C E
For More Information 0
Getting Started 0
See the companion book Getting Started With AppleScript to learn what hardware and software you need to use AppleScript; how to install AppleScript; and how to run, record, and edit scripts.
Scripting Additions 0
Scripting additions are files that provide additional commands you can use in scripts. A standard set of scripting additions comes with AppleScript. Scripting additions are also sold commercially, included with applications, and distributed through electronic bulletin boards and user groups.
For information about using the scripting additions that come with AppleScript, see the companion book AppleScript Scripting Additions Guide: English Dialect.
xviii
Other AppleScript Dialects 0
A dialect is a version of the AppleScript language that resembles a particular language. This guide describes the English dialect of AppleScript (also called AppleScript English). This dialect uses words taken from the English language and has an English-like syntax. Other dialects can use words from other human languages, such as Japanese, and have a syntax that resembles a specific human language or programming language.
For information about a specific dialect, see the version of the AppleScript Language Guide for that dialect.
Scriptable Applications 0
Not all applications are scriptable. The advertising and packaging for an application usually mention if it is scriptable. The documentation for a scriptable application typically lists the AppleScript words that the application understands.
P R E F A C E
Conventions Used in This Guide 0
Words and sample scripts in monospaced font are AppleScript language elements that must be typed exactly as shown. Terms are shown in boldface where they are defined. You can also find these definitions in the glossary.
Here are some additional conventions used in syntax descriptions:
language element
Plain computer font indicates an element that you must type exactly as shown. If there are special symbols (for example, + or &), you must also type them exactly as shown.
placeholder Italic text indicates a placeholder that you must replace
with an appropriate value. (In some programming languages, placeholders are called nonterminals.)
[optional] Brackets indicate that the enclosed language element or
elements are optional.
(a group) Parentheses group together elements. If parentheses are
part of the syntax, they are shown in bold.
[optional]... Three ellipsis points (. . .) after a group defined by
brackets indicate that you can repeat the group of elements within brackets 0 or more times.
(a group). . . Three ellipsis points (. . .) after a group defined by
parentheses indicate that you can repeat the group of elements within parentheses one or more times.
a|b|cVertical bars separate elements in a group from which
you must choose a single element. The elements are often grouped within parentheses or brackets.
xix
P A R T ONE
Introducing AppleScript 1
CHAPTER 1
Figure 1-0 Listing 1-0 Table 1-0
AppleScript, Scripts, and Scriptable Applications 1
This chapter introduces the AppleScript scripting language. It answers these questions:
What is AppleScript?
What are scripts?
Who runs scripts, and who writes them?
How is AppleScript different from other scripting mechanisms?
What can you do with scripts?
What applications are scriptable?
What Is AppleScript? 1
AppleScript is a scripting language that allows you to control Macintosh computers without using the keyboard or mouse. AppleScript lets you use series of written instructions, known as scripts, to control applications and the desktop. Figure 1-1 shows the difference between changing the text style of a paragraph with the mouse and performing the same task with a script.
What Is AppleScript? 3
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Figure 1-1 Changing text style with the mouse and with a script
Changing the style of text with the mouse
Changing the style of text with a script
4 What Is AppleScript?
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
The script shown at the bottom of Figure 1-1 is written in AppleScript English, which is a dialect of the AppleScript scripting language that resembles English. This guide describes AppleScript English and how you can use it to write scripts. Other dialects, such as AppleScript Japanese and AppleScript French, are designed to resemble other human languages. Still others, such as the Programmer’s Dialect, resemble other programming languages. For informa­tion about dialects other than AppleScript English, see the guide for the dialect you want to use. For information about installing dialects, see Getting Started
With AppleScript.
All AppleScript dialects share many features with other scripting, programming, and macro languages. If you’ve used any of these languages, you’ll find AppleScript dialects very easy to learn and use.
AppleScript comes with an application called Script Editor that you can use to create and modify scripts. You can also use Script Editor to translate scripts from one AppleScript dialect to another.
What Can You Do With Scripts? 1
AppleScript lets you automate, integrate, and customize applications. The following sections provide examples.
Automating Activities 1
Scripts make it easy to perform repetitive tasks. For example, if you want to change the style of the word “AppleScript” to bold throughout a document named Introduction, you can write a script that does the job instead of searching for each occurrence of the word, selecting it, and changing it from the Style menu.
Figure 1-2 shows the script and what happens when you run it.
What Can You Do With Scripts? 5
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Figure 1-2 A script that performs a repetitive action
Introduction before running script
Make AppleScript Bold script
Introduction after running script
6 What Can You Do With Scripts?
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Integrating Applications 1
Scripts are ideal for performing tasks that involve more than one application. A script can send instructions to one application, get the resulting data, and then pass the data on to one or more additional applications. For example, a script can collect information from a database application and copy it to a spreadsheet application. Figure 1-3 shows a simple script that gets a value from the Count cell of an inventory database and copies it to the Inventory column of a spreadsheet.
In the same way, a script can use one application to perform an action on data from another application. For example, suppose a word-processing application includes a spelling checker and also supports an AppleScript command to check spelling. You can check the spelling of a block of text from any other application by writing a script that sends the AppleScript command and the text to be checked to the word-processing application, which returns the results to the application that runs the script.
If an action performed by an application can be controlled by a script, that action can be also performed from the Script Editor or from any other application that can run scripts. Every scriptable application is potentially a toolkit of useful utilities that can be selectively combined with utilities from other scriptable applications to perform highly specialized tasks.
Customizing Applications 1
Scripts can add new features to applications. To customize an application, you add a script that is triggered by a particular action within the application, such as choosing a menu item or clicking a button. Whether you can add scripts to applications is up to each application, as are the ways you associate scripts with specific actions.
What Can You Do With Scripts? 7
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Figure 1-3 A script that copies information from one application to another
8 What Can You Do With Scripts?
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Who Runs Scripts, and Who Writes Them? 1
To run a script is to cause the actions the script describes to be performed. Everyone who uses a Macintosh computer can run scripts. Figure 1-4 illustrates two ways to run a script.
Figure 1-4 Different ways to run a script
Double-clicking a script application’s icon
Clicking the Run button
If the script is a script application on the desktop, you can run it by double­clicking its icon. You can also run any script by clicking the Run button in the Script Editor window for that script.
Who Runs Scripts, and Who Writes Them? 9
CHAPTER 1
AppleScript, Scripts, and Scriptable Applications
Although everyone can run scripts, not everyone needs to write them. One person who is familiar with a scripting language can create sophisticated scripts that many people can use. For example, management information specialists in a business can write scripts for everyone in the business to use. Scripts are also sold commercially, included with applications, and distributed through electronic bulletin boards and user groups.
Special Features of AppleScript 1
AppleScript has a number of features that set it apart from both macro programs and scripting languages that control a single program:
AppleScript makes it easy to refer to data within applications. Scripts can
use familiar names to refer to familiar objects. For example, a script can refer to paragraph, word, and character objects in a word-processing document and to row, column, and cell objects in a spreadsheet.
You can control several applications from a single script. Although many
applications include built-in scripting or macro languages, most of these languages work for only one application. In contrast, you can use AppleScript to control any of the applications that support it. You don’t have to learn a new language for each application.
You can write scripts that control applications on more than one computer. A
single script can control any number of applications, and the applications can be on any computer on a given network.
You can create scripts by recording. The Script Editor application includes a
recording mechanism that takes much of the work out of creating scripts. When recording is turned on, you can perform actions in a recordable application and the Script Editor creates corresponding instructions in the AppleScript language. To learn how to turn recording on and off, refer to Getting Started With AppleScript.
AppleScript supports multiple dialects, or representations of the AppleScript
language that resemble various human languages and programming languages. This guide describes the AppleScript English dialect. You can use Script Editor to convert a script from one dialect to another without changing what happens when you run the script.
10 Special Features of AppleScript
Loading...
+ 376 hidden pages