Scripter Windows

When Scripter is first started, you are presented with a text editor window containing the lines Sub Main, followed by a blank line, and then End Sub. This is the code editor window where you type script instructions and where the contents of script files are displayed.

The code window acts as a text editor, similar to the Windows Notepad program, with a few enhancements to facilitate script writing:

  • After you press the ENTER key, tabs or spaces are automatically inserted at the beginning of the next line to maintain the same indentation level as the previous line.

  • Key words and symbols of the BASIC language are displayed in different colors. You can use the View | Colors command to modify the colors used to display the various elements of the programming language.

  • A light horizontal divider line is automatically drawn between sections of your script. The divider lines help you to locate the start of subroutine and function definitions.

Above the code editor window is a bar containing the Object and Proc (procedure) lists. Selecting items from these lists moves the various sections of your script file into view. The object and procedure lists are useful when your script file becomes large.

Above the object and procedure lists, you may see a blank window area with a tab on top that reads Immediate. If this window is not visible, select the View | Always Split command to make it appear. The immediate window is used to execute one-line instructions immediately. When you type an instruction into this window and press the ENTER key, Scripter carries out the instruction.

In addition to being a scratch area for evaluating language statements, the immediate window shows debugging information. The output from the Debug.Print statement and the value of variables selected with the Debug | Quick Watch command are printed in the immediate window. While a script program is running, Watch, Stack, and Loaded tabs are added at the top of the immediate window area. Click these tabs for information that may be useful for debugging. See Debugging Scripts for more information on the immediate, watch, stack, and loaded windows.

Along the left edge of the code window are code sheet tabs. When you select either the File | New command or the File | Open command, Scripter creates a new code sheet and inserts a new sheet tab. Each tab corresponds to one of the code sheets. Clicking once on a tab makes that sheet the current sheet. Double-clicking a tab closes the sheet.

Between the sheet tabs and the code window is an area called the "break bar." When a script is paused, a yellow arrow in the break bar shows which line is next to execute. The break bar also shows which lines have break points. Set a break point by clicking on the break bar. A red dot appears in the break bar, and the adjacent line in the code window is highlighted. When a line marked as a break point is about to be executed, Scripter pauses program execution. To clear a break point, click on the red dot in the break bar. See Debugging Scripts for more information on break points.

A status bar along the bottom of the Scripter window shows information about the current state of the program. The View | Show/Hide | Status Bar command hides or reveals the status bar. Before running a script, make sure that the status bar is visible because messages about typographical and syntax errors are displayed in the status bar.

 

This Scripter application window is shown while execution of a script is paused.

See Also

Introducing Scripter

Surfer Object Model

Object Hierarchy