Writing and editing scripts
Whether you start with an existing script, record actions, or write your own script, you will need to edit your script using the Script Editor. You use the Script Editor to write and edit scripts in the same way you use other text editors. Breaking up a line You can use the continuation character (¬) to break up long lines in a script. When you run the script, AppleScript treats the line as a single line. Here's an example: make new folder at desktop with properties ¬ To insert a continuation character in a line: Indenting lines As you write a script, the Script Editor can indent the lines of compound statements to show their structure. To indent lines in a compound statement: Formatting the script When you check the syntax of a script, the Script Editor formats the different types of terms in the script. You can change the way it formats the script. To change script formatting: The changes you make apply to any script you open. You cannot format part of a script. You can format text in the Description field.
|
||||||||
Table of contents |