Script Editor Icon

Writing scripts with Script Editor

Script Editor is a powerful tool for creating and editing your own scripts, as well as customizing scripts written by others.

To write scripts:

Step 1

Enter script text in the top pane of the script window.

Step 2

Check for errors in script syntax by clicking the Compile button, pressing Command-K, or pressing the Enter key.

If there are syntax or spelling errors in the script, they will be highlighted and an error message is displayed.

Step 3

After compiling, the script text terms and phrases are colored according to the styles set in the Formatting pane of Script Editor preferences.

Script text will also be indented to indicate the hierarchical structure of the scriptable objects used in the script.

Step 4

Make any corrections, and compile the script again until all errors have been corrected.

You can save time and effort by inserting prewritten routines in your script with the shortcut menu (also know as the contextual menu.) To open the shortcut menu, press Control and click in the script.

Related Topics

editing scripts