Using the Display Interface


BlueZone Script Editor

Script Events

A basic BlueZone Script file has the ability to execute all menu commands from the BlueZone Display and has the ability to send all host key sequences to the host system.  Script Events are used to add flow control and user input to BlueZone scripts.  In addition, script events can be used to gain the attention of the user, add comments to a script file, and to execute programs on the workstation.

The examples following the script event statements above reflect what appears in the script view window in BlueZone Script Editor.  BlueZone Scripting is a GUI scripting language, ie. there is no syntax to learn or text files to maintain.  Scripts are created by adding, editing and deleting script statements.  BlueZone script files are small because they are a binary representation of the script.  BlueZone script files can only be viewed and modified by using the BlueZone Script Editor.

Because Script files can execute all BlueZone Display menu commands including the ability to play BlueZone Macro files.  If a script file is looping and playing a BlueZone macro, then the script should wait a couple of seconds or so before or after playing the macro file so that the user has the ability to Cancel script execution if desired.

Following is a description of the currently supported BlueZone Script Events:


Beep

Causes the PC speaker to produce a sound.

Example: Beep


Clear_Watch

Halts all previous Watch_For statements.  See Watch_For for more information.

Example: Clear_Watch


;Comment

Used to add remarks and/or blank lines to the script file.

Example: ;This is where we start the logon process.


Goto

Causes script execution to begin at the specified label.  See the Label command for more information.

Example: Goto SignOn


Input

Displays a customized User Input dialog during script execution.  The Input command provides a mechanism for decision making based on user input and is used in conjunction with the If_Input_Is statement.

The following options are available for the Input dialog:

or

Example: Input Menu Selection


If_Input_Is

Provides for the ability to determine user input. Used in conjunction with the Input statement.

Example: If_Input_Is "Quit" Then Goto End


Label

Used to specify a position in the script file where a Goto command can be used to continue script execution.

Example: :SignOn


Message

Displays a message box with a "Ok" button containing some specified text to the user.

Example: Message "Script completed successfully."


Return

Causes script execution to continue with the statement following the last Goto command.

Example: Return


Run

Executes a program.

Example: Run "WordPad"


Type

Used to type characters into the host session window starting at the current cursor position.

Example: Type "UserId"


Wait

Causes script execution to pause for the specified number of seconds.

Example: Wait 3


Wait_For

Causes script execution to suspend until the specified text string is found in the host session window.  For example, you can wait for the desired string starting from the very upper left hand corner of the screen and searching to the very end of the screen.  You can wait for the desired string starting at a specific row and column or you can wait for the desired string only when found at a specific location on the screen.

In addition, you can also make the search case sensitive and add an optional "Timeout" value.

SEE  Using the Wait_For Script Event for more detailed information on using this feature.


Wait_Ready

Causes the script execution to suspend until the specified number of keyboard restores have been sent by the host.  This prevents the scripts from sending data to the host between keyboard restores, when the host is actually not ready.  The number of keyboard restores on a host screen is consistent and a more reliable means of controlling script execution than inserting timers after each script event.  The keyboard restore counter is on by default and is located adjacent to the "Ready" on the status line.

Example: Wait_Ready "3"  Waits for 3 keyboard restores from the host before proceeding.


Wait_Until

Causes script execution to suspend until the specified time and date.

Example: Wait_Until 09-23-1999 17:30:28


Watch_For

Causes the script to search for the specified text string in the host session window each time a host write occurs.  If the text string is found, then the associated statement is then executed.  Execution of the script continues after the Watch_For statement.  Watch_For statements stay in effect until a Clear_Watch statement is encountered in the script.

Example: Watch_For "Error" Then Goto End