User Guide

88 Chapter 4: Debugging Scripts in Director
Managing the Message window
The Message window has an Input pane and an Output pane. The Input pane is editable. The
Output pane is read-only. The only way to display text in the Output pane is by calling the
put()
or
trace() functions.
You can adjust the sizes of the Input and Output panes by dragging the horizontal divider that
separates them.
To resize the Output pane:
Drag the horizontal divider to a new position.
To hide the Output pane completely:
Click the Collapse/Expand button in the center of the horizontal divider.
When the Output pane is hidden, output from scripts that execute is displayed in the
Input pane.
To display the Output pane if it is hidden:
Click the Collapse/Expand button again.
To clear the contents of the Message window:
Click the Clear button.
If the Output pane is visible, its contents are deleted.
If the Output pane is not visible, the contents of the Input pane are deleted.
To delete a portion of the contents of the Output pane:
1 Select the text to be deleted.
2 Press the Backspace or Delete key.
To copy text in the Input or Output pane:
1 Select the text.
2 Select Edit > Copy.
Testing scripts in the Message window
You can test Lingo and JavaScript syntax statements to see how they work by entering them in the
Message window and observing the results. When you enter a command in the Message window,
Director executes the command immediately, regardless of whether a movie is playing.
Before entering the statements you want to test, you must first select which scripting syntax,
Lingo or JavaScript syntax, you are going to test.
To select the scripting syntax
1 From the Script Syntax pop-up menu, select either Lingo or JavaScript.
To test a one-line statement:
1 Type the statement directly in the Message window.
2 Press Enter (Windows) or Return (Macintosh). Director executes the statement.
If the statement is valid, the Message window displays the result of the statement in the Output
pane at the bottom of the window. If the script is invalid, an alert appears.