You can create, edit, and delete scripts within the CAVI using the Script Editor. From the Scripts menu select Editor, and the Script Editor dialog will open.

Script Editor Dialog

Components of the Script Editor include the Menu Bar, the Main Toolbar, the Script Context Pane, and the Editor Pane. The following sections describe each of these components.

Menu Bar

The following commands are available from the Menu Bar: 

  • File menu
    • New - create a new script
    • Open - open an existing script (when a script is selected in the Script Context Pane)
    • Run - run an existing script (when a script is selected in the Script Context Pane)
    • Delete - delete an existing script (opens the Delete Object dialog)
    • Save - save the script that is active within the Editor Pane
    • Save As - save the script that is active within the Editor Pane as a new script
    • Print - print the script that is open within the Script Context Pane
    • Close - close the Script Editor Dialog
  • Edit menu
    • Cut - cut selected text from the active script
    • Copy - copy selected text from the active script
    • Paste - paste selected text into the active script
    • Select All - select all text within the active script
    • Find - open the Find dialog, search for text within the active script
  • Source menu
    • Convert Tabs to Spaces - replaces tabs with whitespace (space equivalent)
    • Show Whitespace - replaces whitespace with a period (visual only)

Main Toolbar

The main toolbar includes shortcut buttons for common commands, including New, Print, Cut, Copy, and Paste.

Script Context Pane

The Script Context Pane allows you to navigate to folders in the CWMS directory structure and access scripts saved within those folders. The name of the script is also the name displayed in the Script Selector dialog. To edit a script, double-click on the script name and the script opens in the Editor Pane.

Script Context Pane

Editor Pane

Scripts are modified in the Editor Pane. The name displayed on the tab is the same as the name in the Script Context Pane. The pathname of the file is displayed in the File box.

Editor Pane

By right-clicking in the Script Text box, a shortcut menu will appear, as shown below.

Shortcut Menu in the Editor Pane