Script Editing Window

These windows allow one to edit scripts. For a list of available commands see Script Commands ; for general information about scripts see About scripts . Several basic editing functions are available in the window. Text can be selected with the mouse. Text can be cut with Ctrl X, copied with Ctrl C, and pasted with Ctrl V. Ctrl Z will undo the last action. While you are editing a script, the text in the window will not match the version of the script stored in the program. However, running the script, closing the editing window with the OK button, switching the editing window to another script, or even exiting the program will transfer the text in the window to the program's memory.

The buttons above the text area can be used to switch the Editor window to the next or previous available script, or to shift the current script down or up in the list of scripts.  Specifically:

Left and Right Editor buttons - Switch the editor window to the previous or next script that is not already open in an editor.

Up and Down Script buttons - Shift a script in the list of scripts; i.e., swap it with the previous or next numbered script.  'Up' and 'down' here refer to the vertical position of scripts in the menu and toolbar.  The window will stay with the current script and change its number.  If the adjacent script is also open in a editor, both windows will change.

Completions and Auto-indenting - Below these buttons is a line of text that starts out with a reminder that you can use Tab or ` (the back-tick character) to automatically complete a command name (the first word on a line) as well as convert it to a standard mixed-case form.  Tab may not work on non-US keyboards, but ` always will.  When you start editing in a window, this line will list up to 10 possible completions of the current text as you type a command.  Only a few will show up at the default window size; make the window wider to see more completions. 

Another consequence of typing Tab or ` anywhere on the line is that the editor will set the indentation of the current line based on the indentation of the previous line, whether the previous line starts a block (i.e., with If, Else, Elseif, Loop, or Function), and whether the current line ends such a block.  The amount of additional space in a block can be controlled with the Set Indent Size command in the Scipt menu.

The buttons below the text area perform the following functions:

Run button - will save the script in program memory and run it.

Cancel button - will close the window without saving the most recent changes in program memory.

OK button - will save the script in program memory and close the window.

Find button - will search for text in the script.  An entry box will open for the text to find.  The search is case-insensitive.

Load button - will allow you to read a script from a file into the current script. Once a script has been read from a file, the Save button will save it back to that file.

Save button - will allow you to save this script to a text file. If you have saved it to a file before, or if you loaded it from a file, it will be saved to the same file. Otherwise you will enter the Save As dialog box to specify a file

Save As button- will allow you to save this script to a different file via the Save As dialog box.