User Guide
74 Chapter 3: Writing Scripts in Director
Setting Script window preferences
You can change the font of text in the Script window and define different colors for various code
components. To change the default font of text in the Script window and the color of various
code elements, you use Script window preferences. Director automatically colors different types of
code elements unless you turn off Auto Coloring.
To set Script window preferences:
1 Select Edit > Preferences > Script.
2 To choose the default font, click the Font button and select settings from the Font dialog box.
3 To choose the default color of text in the Script window, select a color from the Color menu.
4 To choose the background color for the Script window, select a color from the Background
color menu.
5 To make new Script windows automatically color certain code elements, select Auto Coloring.
This option is on by default. With Auto Coloring off, all text appears in the default color.
6 To make new Script windows automatically format your scripts with proper indenting, select
Auto Format. This option is on by default.
Note: The auto coloring and auto formatting features do not apply to JavaScript syntax code.
Therefore, if you are authoring scripts using JavaScript syntax, the Auto Coloring and Auto Format
buttons in the Script window are disabled, and terms such as
function, var, and this will appear in
the default text color.
7 To make new Script windows display line numbers for your scripts, select Line Numbering.
This option is on by default.
8 If Auto Coloring is on, select colors for the following code elements from the corresponding
color menus:
■ Keywords
■ Comments
■ Literals
■ Custom (terms you define in your own code)
9 To change the line number column background color, click the Line Numbers color menu and
choose a new color.
10 To change the location of the Call Stack, Variable, and Watcher panes in the Debugger
window, select left, top, right, or bottom from the Debugger Panes menu.