3.2.1 Script Editor window and menus
Editor is used for creating and editing scripts.
This section describes the functions and menus of the Script Editor window which appears when you start Editor.
- Organization of this subsection
(1) Script Editor window
Figure 3-2 shows the Script Editor window and the names of its components.
(a) Toolbars
The toolbars contain buttons representing the most frequently used commands on the pull-down menus. By simply clicking a button, you can execute the corresponding command. You can hide a toolbar by toggling the corresponding Toolbar command in the View menu.
The following command buttons are displayed on the toolbars of the Script Editor window.
- Standard toolbar
-
- Create
-
Creates a new script file.
- Open
-
Opens a script file.
- Save
-
Saves a script file.
-
Prints a script file.
- Exit
-
Quits Script Editor.
- Help
-
Displays the JP1/Script online help.
- Editing toolbar
-
- Undo
-
Reverses the previous action.
- Redo
-
Reinstates the previous action.
- Cut
-
Cuts selected text to the clipboard.
- Copy
-
Copies selected text to the clipboard.
- Paste
-
Pastes text from the clipboard to a specified position.
- Select All
-
Selects all the written text.
- Set Comment
-
Sets a selected line as a comment.
- Cancel Comment
-
Changes a selected comment into a normal line.
- Easy Input
-
Enables easy input of a command or statement.
- Menu Editor
-
Starts Menu Editor.
- Monitoring toolbar
-
- Syntax Check
-
Checks the syntax of a completed script.
- Execution Up to the Breakpoint
-
Starts or restarts execution up to the next breakpoint.
- Cancel Monitoring
-
Cancels monitoring.
- Step Execution
-
Executes commands or statements one by one.
- Consecutive Step Execution
-
Executes a sequence of commands or statements.
- Pause Consecutive Step Execution
-
Suspends consecutive step execution.
- Set/Cancel Breakpoint
-
Sets or cancels a breakpoint.
- Cancel All Breakpoints
-
Cancels all breakpoints.
- Set
-
Sets the monitoring environment.
- Show/Hide Watch Window
-
Shows or hides the Watch window.
- Add to Watch Window
-
Adds a selected variable to the Watch window.
- Set Execution Environment
-
Sets the script file environment.
- Search toolbar
-
- Find
-
Sets the search criteria.
- Find Previous
-
Searches for the string from the current position to the beginning of the script file.
- Find Next
-
Searches from the current position to the end of the script file.
(b) Ruler
A scale showing the column numbers across the lines.
(c) Line numbers
An area showing the script line numbers.
(d) Breakpoint area
An area showing the breakpoint symbol () and the next-execution-step symbol ().
(e) Status bar
The status bar displays messages about the current processing being executed by Script Editor and status messages at completion of processing.
(f) Client area
The client area displays the script file contents.
(2) Menus in the Script Editor window
The pull-down and pop-up menus in the Script Editor window are described next.
(a) Menus and commands
Table 3-6 lists the Script Editor commands (functions) provided in the pull-down menus.
Menu |
Command (function) |
Description |
---|---|---|
File |
Create |
Creates a new script file. |
Open |
Opens an existing script file. |
|
Save |
Saves a script file, replacing its previous contents. |
|
Save As |
Saves a script file under a new name. |
|
|
Prints a file. |
|
Exit |
Quits Script Editor. |
|
file-name |
Displays the names of the most recently saved script files, to a maximum of nine file names. |
|
Edit |
Undo |
Reverses the previous action. |
Redo |
Reinstates the previous action. |
|
Cut |
Cuts selected text to the clipboard. |
|
Copy |
Copies selected text to the clipboard. |
|
Paste |
Pastes text from the clipboard to a specified position. |
|
Select All |
Selects all the written text. |
|
Set Comment |
Sets a selected line as a comment. |
|
Cancel Comment |
Changes a selected comment into a normal line. |
|
Easy Input |
Enables easy input of a command or statement. |
|
Menu Editor |
Starts Menu Editor. |
|
Options |
Sets the Editor operating environment. |
|
Monitoring |
Syntax Check |
Checks the syntax of a completed script. |
Execute Monitoring - Execution |
In monitoring mode, starts or restarts script execution up to the next breakpoint. |
|
Execute Monitoring - Step Execution |
In monitoring mode, executes commands or statements one by one. |
|
Execute Monitoring - Consecutive Step Execution |
In monitoring mode, executes a sequence of commands or statements until the user chooses Pause Consecutive Step Execution. |
|
Execute Monitoring - Pause Consecutive Step Execution |
Suspends consecutive step execution. |
|
Execution |
Executes the script file to the end. |
|
Cancel Monitoring |
Cancels monitoring execution. |
|
Set/Cancel Breakpoint |
Sets or cancels a breakpoint. |
|
Cancel All Breakpoints |
Cancels all breakpoints. |
|
Set |
Sets the operating environment for monitoring mode. |
|
Add to Watch Window |
Adds a selected variable to the Watch window. |
|
Set Execution Environment |
Sets the script file environment. |
|
Jump to Execution Line |
In monitoring mode, displays the line being executed. |
|
View |
Toolbar - Standard Toolbar |
Shows or hides the standard toolbar. |
Toolbar - Edit Toolbar |
Shows or hides the editing toolbar. |
|
Toolbar - Monitoring Toolbar |
Shows or hides the monitoring toolbar. |
|
Toolbar - Search Toolbar |
Shows or hides the search toolbar. |
|
Status Bar |
Shows or hides the status bar. |
|
Align Toolbars |
Arranges the toolbars in four rows. |
|
Ruler |
Shows or hides the ruler. |
|
Vertical Scroll Bar |
Shows or hides the vertical scroll bar. |
|
Horizontal Scroll Bar |
Shows or hides the horizontal scroll bar. |
|
Display Line Numbers |
Shows or hides line numbers. |
|
View Beginning of File |
Displays the beginning of the script file. |
|
View End of File |
Displays the end of the script file. |
|
View Watch Window |
Shows or hides the Watch window. |
|
Search |
Find |
Sets a search or replace string, and the search method. |
Replace |
Replaces the search string with specified text. |
|
Find Previous |
Searches for or replaces a string to the beginning of the file. |
|
Find Next |
Searches for or replaces a string to the end of the file. |
|
Help |
Contents |
Displays the contents of the JP1/Script online help. |
Search by Keyword |
Lists the keywords of the JP1/Script online help. |
|
About JP1/Script |
Displays version information for JP1/Script. |
(b) Pop-up menu
To display the pop-up menu in the Script Editor window, right-click in the client area. Different pop-up menus are displayed in edit mode and monitoring mode. Table 3-7 lists the pop-up commands available in edit mode. Table 3-8 lists the pop-up commands in monitoring mode.
Command (function) |
Description |
---|---|
Create |
Creates a new script file. |
Open |
Opens an existing script file. |
Save |
Saves a script file, replacing its previous contents. |
Undo |
Reverses the previous action. |
Redo |
Reinstates the previous action. |
Cut |
Cuts selected text to the clipboard. |
Copy |
Copies selected text to the clipboard. |
Paste |
Pastes text from the clipboard to a specified position. |
Select All |
Selects all the written text. |
Set Comment |
Sets a selected line as a comment. |
Cancel Comment |
Changes a selected comment into a normal line. |
Easy Input |
Enables easy input of a command or statement. |
Menu Editor |
Starts Menu Editor. |
Command (function) |
Description |
---|---|
Copy |
Copies selected text to the clipboard. |
Set/Cancel Breakpoint |
Set or cancels a breakpoint. |
Add to Watch Window |
Adds a selected variable to the Watch window. |
(3) Error window
The Error window displays errors occurring during monitoring execution.
(a) Client area
- Type
-
Shows the type of error. When you double-click in this field, the cursor moves to the corresponding error.
- Line
-
Shows the line in which the error occurred.
- Column
-
Shows the column in which the error occurred.
- Command name
-
Shows the command in which the error occurred.
- Contents
-
Describes the error.
(b) Error window operations
When you right-click in the Error window, the following pop-up menu appears:
-
Jump: Jumps to the selected line or column.
(4) Watch window
Displays variable names and values when you are monitoring script execution.
For details about adding variables to the Watch window, see 3.2.12 Adding a variable to the Watch window.
(a) Client area
- Variable name
-
Shows the variable name.
- Value
-
Shows the variable value. If the variable name is invalid, Error:Invalid Data appears. If one of the following conditions exists for an array variable, Error:Invalid Data also appears because the value cannot be referenced:
-
An index number is not specified.
-
The specified index number is outside the valid range.
-
The specified array variable does not have an appropriate dimension.
-
(b) Watch window operations
When you right-click in the Watch window, the following pop-up menu appears:
-
Update Value: Updates the value of the selected variable.
-
Delete Variable: Deletes the selected variable.