BlueZone Scripting
BlueZone and BlueZone Web-to-Host offer several powerful tools for automating repetitive tasks, streamlining the user interface, and communicating with external applications. Each tool has its strengths and weaknesses and should be used appropriately. The following describes each tool and how to determine its appropriate use.
BlueZone Macros differ from greatly from what other emulators call “Macros”. BlueZone Macros are recorded and played back using a Windows API function that records key strokes as well as mouse movements. The recording of keystrokes and mouse movements are system wide and not limited to BlueZone functions.
Advantages of BlueZone Macros are:
Macros are easy for End Users to record and play back.
Macros can play keystrokes and mouse movements outside of the BlueZone interface allowing it to execute other programs through a mouse click or type in other applications.
Disadvantages of BlueZone Macros are:
Typing within a host session is timing dependent and not keyboard lock state aware. Slow host response time could result in the Macro running during a locked keyboard state.
Macros cannot be edited.
SEE Using
the Display Interface - BlueZone Macros for more information.
BlueZone Recorded Scripts can be recorded in either a proprietary format or in a text based format recorded in either VBScript or JavaScript.
BlueZone proprietary scripts are targeted at users with a basic understanding of scripting and logic but without skill sets required to write and edit VBScripts or JavaScripts.
BlueZone text based scripts are targeted at users who wish to leverage their proficiency with either VBScript or JavaScript and want to take advantage of being able to write and edit BlueZone scripts in a scripting language that they already know.
The type of script desired is selected at the time when the script is created by selecting the desired file extension.
File Extension |
Script Type |
.BZS |
BlueZone Proprietary Script |
.VBS |
VBScript |
.JS |
JavaScript |
The pros and cons of BlueZone proprietary formatted vs. BlueZone text formatted scripts are discussed at the end of each topic below.
BlueZone Proprietary Scripts are recorded and played back using a proprietary method. Scripts are typically created by recording keystrokes and can be used as is, or can be edited later to change the desired playback. Scripts are edited using the BlueZone Script Editor (bzse.exe) application which is launched from the BlueZone MenuBar by selecting Script:Edit and choosing the desired script. Choosing a script that ends in .bzs will result in the launching of the BlueZone Script Editor application with the requested script displayed in the editing window.
For an overview of the BlueZone Script Editor help, click here.
BlueZone Script Editor is a GUI tool allowing users to drag Script Events into the Script flow, change the order of events, and delete previously recorded events. BlueZone Scripts support a proprietary mechanism called Wait_Ready that ensures the host is ready to accept input, even when using TN3270 or TN3270E.
Advantages of BlueZone Proprietary Scripts are:
Easy to record.
Easy to edit with BlueZone Script Editor.
Keyboard lock state aware.
Support for advanced functions like wait for, watch for, text input, etc.
Can execute other programs using the Run command.
Can run BlueZone Menu commands, ex; Copy, Paste, Print Screen.
Can accept variables passed from a BlueZone Web to Host Object Tag. ex: Login ID and Password generated dynamically by the web application and used to sign the user into the mainframe.
Disadvantages of BlueZone Scripts are:
Do not support file I/O.
No external application integration.
BlueZone Text Based Scripts can be written or recorded in either VBScript or JavaScript. Scripts are typically created by recording keystrokes, but can be edited later to change the desired playback. Scripts are edited using the BlueZone Script Host & Debugger (bsh.exe) application which is launched from the BlueZone MenuBar by selecting Script:Edit and choosing the desired script. Choosing a script that ends in either .vbs or .js script will result in the launching of the BlueZone Script Host & Debugger application with the requested script displayed in the editing region.
BlueZone Script Host & Debugger is discussed in more detail in the BlueZone Script Host section below.
Advantages of BlueZone Text Based Scripts are:
Easy to record or can be written from scratch.
Can be written in VBScript or JavaScript
Easy to edit with BlueZone Script Host & Debugger.
Support unique BlueZone methods which control the behavior of BlueZone.
Disadvantages of BlueZone Text Based Scripts are:
Require a working knowledge of VBScript or JavaScript.
SEE Using
the Display Interface - BlueZone Scripts for more information.
BlueZone Script Host is a language-independent host for ActiveX scripting engines on 32-bit Windows platforms. This tool will allow you to run Visual Basic® Scripting Edition (VBScript) and JScript™ natively within the base operating system, either on Windows 95, Windows 98, Windows NT, Windows 2000 or Windows XP, and will act as a host for other ActiveX-supported scripting languages such as Perl, Rexx, and Python. In addition, BlueZone Scripting Host allows scripts to communicate with BlueZone Display emulation software products. Using the scripting languages you already know, you can write scripts to execute common tasks on a variety of host systems, automate user input, obtain data from host systems, initiate file transfers, and more.
Using the BlueZone Script Host & Debugger, BlueZone can record and playback scripts using VBScript or JScript. Once recorded, these scripts may be played back as-is, or edited using the Script Host & Debugger. The record and playback feature makes using VBScript and JScript available to the non-technical user.
BlueZone Script Host & Debugger is also a general purpose VBScript and JScript debugger that supports break points, stepping, and color-coding of scripts providing a powerful interface for script development.
Advantages of BlueZone Script Host are:
Very powerful.
Can control multiple host sessions simultaneously.
Use of industry standard scripting languages.
Direct access to read from and write to the host screen.
File I/O support.
Support of scripted Variables.
COM compliance allows any other COM complaint component to be loaded by the script to extend its functionality.
Powerful editing and debugging features.
Ability to view the value of script variables while executing/debugging the script.
Dialog support to create Windows dialogs for user interaction.
Disadvantages of BlueZone Script Host are:
Complex, text based scripting language.
Requires a relatively high degree of scripting ability.
SEE The
BlueZone Advanced Automation Guide
for more information on the BlueZone
Script Host and BlueZone Script Host & Debugger and also the
BlueZone Dialog Editor.
TIP
All BlueZone
documentation can be found on the BlueZone
CD-ROM or BlueZone CD image.
To locate
a particular document, double click the DocumentationRoadmap.htm
document located in the root of the BlueZone CD-ROM or BlueZone CD image.
BlueZone and BlueZone Web to Host offer several options to automate and integrate BlueZone with other applications. To guide your decision when choosing one or more of BlueZone’s automation solutions, evaluate your requirements, the technical skill set of your End Users, and whether developers will be needed in order to create scripts or applications used by others in the enterprise.
Related Topics: