BlueZone Scripting |
Chapter 10 |
BlueZone and BlueZone Web to Host offer a wide variety of 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.
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.
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
BlueZone Display & Printer Help
for more information on BlueZone Macros.
Click here to Launch BlueZone Display & Printer Help from the Seagull Software Web Site.
BlueZone 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, but 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 region as shown in illustration 10-1 below.
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.
They are easy to record.
They are easy to edit with BlueZone Script Editor.
They are keyboard lock state aware.
They support advanced functions like wait for, watch for, text input, etc.
They can execute other programs using the Run command.
They can run BlueZone Menu commands, ex; Copy, Paste, Print Screen.
They 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.
The BlueZone Administrator can control whether or not End Users can record and play scripts or only play scripts.
SEE
Controlling
Scripting Access for more information on this feature.
They do not support text input variables.
They do not support file I/O.
There is no external application integration.
The following is an example of a BlueZone proprietary script being displayed for editing in the BlueZone Script Editor:
Illustration 10-1
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 as shown in illustration 10-2 as shown below.
BlueZone Script Host & Debugger is discussed in more detail in the BlueZone Scripting Host section below.
They are easy to record or can be written from scratch.
They can be written in VBScript or JavaScript
They are easy to edit with BlueZone Script Host & Debugger.
They support unique BlueZone methods which control the behavior of BlueZone.
They require a working knowledge of VBScript or JavaScript.
SEE
BlueZone
Display & Printer Help for more information on BlueZone Scripts.
Click here to Launch BlueZone Display & Printer Help from the Seagull Software Web Site.
BlueZone Scripting 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 Script 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 BlueZone Script Host & Debugger, BlueZone can record and playback scripts using VBScript or JavaScript. 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 JavaScript available to the non-technical user.
BlueZone Script Host & Debugger is also a general purpose VBScript and JavaScript debugger that supports break points, stepping, and color-coding of scripts providing a powerful interface for script development.
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.
Complex, text based scripting language.
Requires a relatively high degree of scripting ability.
The following is an example of editing a script in the BlueZone Script Host & Debugger:
Illustration 10-2
The following is an example of creating a dialog with the BlueZone Dialog Editor:
Illustration 10-3
SEE
BlueZone
Script Host & Debugger Help for more information on using the
Script Host & Debugger and
the Dialog Editor.
Click here to Launch BlueZone Script Host & Debugger Help from the Seagull Software Web Site.
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.