Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


B.1 Sample file that executes processing according to numbers selected in a displayed menu

Organization of this subsection

(1) Summary of functions

When you execute the sample file, a menu appears. The following actions are performed by selecting numbers in the menu:

Process No. 1

Creates a script file.

Process No. 2

Copies the script file.

Process No. 3

Outputs a list of files in the folder that contains the sample file to the user trace file.

Process No. 9

Terminates the sample file.

(2) File organization

SmplMain.Spt: Main script file of this sample file

Smpl001.Spt: Script file for process No. 2

Smpl002.Spt: Script file for process No. 3

Sample.Spt: Default script file created in process No. 1.

(3) Executing the sample file

  1. Execute the script file SmplMain.Spt.

    The menu window appears.

  2. Type the number of the process that you want to execute. Then choose the Run button. If you choose Cancel, the sample program ends.

    • Select 1 to open the window for specifying the script file name. Enter the file name, and then click the OK button.

      The specified script file opens.

    • Select 2 to copy the script file created in process No. 1. A folder named CopyFolder is created in the folder containing the sample file, and the file is copied with the file name bkupSpt.spt.

    • Select 3 to output a list of files in the folder containing the sample file to the user trace file. The name of the user trace file is SmplOut.TXT.

    When processing terminates normally, the display returns to the menu window.

    If an error occurred, a beep sounds, and a message box opens. In addition, a user error warning is output as the status information in Trace Viewer.