BlueZone Scripting |
Chapter 10 |
BlueZone and BlueZone Web to Host have a 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 and mouse movements. The recording of keystrokes and mouse movements is system wide and not limited to BlueZone functions.
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.
Macros are easy for users to record and play back.
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 Please refer to BlueZone
Display & Printer Help for more information on BlueZone Macros.
Click here to Launch BlueZone Display & Printer Help from the Seagull Software Web Site.
Scripts are recorded and played back using a proprietary method. Scripts only record keystrokes, but may be edited to change the playback. Scripts are edited using the BlueZone Script Editor (bzse.exe) application that is launched from the Script:Script Editor menu item on the BlueZone MenuBar (when installed in Desktop mode). The Script Editor is a GUI tool allowing users to drag Script Events into the Script flow, change the order of events, and delete events previously recorded. BlueZone Scripts support a proprietary mechanism called Wait_Ready that ensures the host is ready to accept input, even when using TN3270 or TN3270E.
Scripts may be edited.
Scripts are keyboard lock state aware.
Scripts support advanced functions like wait for, watch for, text input, etc.
Scripts can execute other programs using the Run command.
Scripts can run BlueZone Menu commands, EX; Copy, Paste, Print Screen.
Scripts 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.
Scripts do not support text input variables.
Scripts do not support file I/O
No external application integration
The following is an example of a BlueZone script being displayed for editing in the BlueZone Script Editor:
Illustration 10-1
SEE Please refer to BlueZone
Display & Printer Help for more information on BlueZone Scripting.
Click here to Launch BlueZone Display & Printer Help from the Seagull Software Web Site.
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 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 Java Script. 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 JScript 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.
Variable Support.
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.
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 Please refer to 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.
The BlueZone Host Automation Object is a Component Object Model (COM) software component for 32-bit Windows platforms. BlueZone Host Automation Object can be utilized by any COM container application like Visual Basic, Microsoft Excel, and Microsoft Word to enable communications between PCs running BlueZone Display emulation software products and IBM mainframe and iSeries systems. With BlueZone Host Automation Object, applications can execute common tasks on various host systems, automate user input, obtain data from host systems, initiate file transfers, and more.
The BlueZone Host Automation Object is a language-independent software component. Programs written in Visual Basic®, Pascal, C, C++, etc. can invoke the BlueZone Host Automation Object to communicate with the host system. In addition, the BlueZone Host Automation Object can be incorporated into many popular word processing, database and spreadsheet macros, and run by any ActiveX scripting engine, including the BlueZone Scripting Host.
The BlueZone Host Automation Object utilizes capabilities of BlueZone's File Mapping (Shared Memory), DDE (Dynamic Data Exchange) and HLLAPI (High-Level Language API) interfaces. In addition to the container’s properties and methods, the BlueZone Host Automation Object adds objects, properties and methods that enable interaction with the BlueZone session and the host system.
Easier to implement than HLLAPI or DDE and provides greater functionality.
Allows easy integration with any COM compliant application.
Language Independent.
BlueZone Host Automation Object is a development tool that requires familiarity with programming to implement.
The following is an example of a Visual Basic Script that loads BlueZone Host Automation Object:
Illustration 10-4
The following is an example of the BlueZone Host Automation Object Loaded in a MS Excel VBA Macro:
Illustration 10-5
SEE Please refer to BlueZone
Script Host & Debugger Help for more information on using the
Script Host & Debugger.
Click here to Launch BlueZone Script Host & Debugger Help from the Seagull Software Web Site.
BlueZone is fully 32-bit WHLLAPI and EHLLAPI 1.1 compatible allowing easy migration to BlueZone of many custom or third-party applications used with other emulators. BlueZone HLLAPI is compatible with third party HLLAPI applications including (but not limited to) those from Shared Medical (Siemens), Neasi-Webber, Real Vision, and Princeton Tech.
To support older HLLAPI applications on 32-bit systems, BlueZone also supports DOS HLLAPI and 16-bit HLLAPI conversations with 32-bit BlueZone.
HLLAPI is a standard API supported by many software vendors.
The disadvantages of using HLLAPI are:
The specification may be interpreted differently from vendor to vendor causing some incompatibilities.
HLLAPI requires a programmer to write the application.
The interface must be constantly polled by the HLLAPI application to get the status of the host screen.
For new development, the BlueZone Host Automation Object is much easier to implement in a wider range of development tools.
NOTE If
you intend on writing a program to interface with BlueZone via the HLLAPI
interface, the following documents are provided on the BlueZone
CD-ROM or the BlueZone Image.
BZWHLL.H
BZWHLL_I.C
WOSA HLLAPI 1.1.DOC
These documents are located in the DOCS\WHLLAPI folder on the BlueZone CD-ROM or BlueZone Image file.
SEE Please refer to Chapter
5 Configuring BlueZone and BlueZone Script
Host & Debugger Help for more information on using BlueZone
with HLLAPI.
Click here to Launch BlueZone Script Host & Debugger Help from the Seagull Software Web Site.
BlueZone is a DDE server and uses DDE to communicate with the HLLAPI interface. BlueZone also uses Network DDE to allow communication across a network between a DDE application running on one system and BlueZone running on another. DDE calls supported in BlueZone are detailed in the BZDDE.H file supplied on the BlueZone CD-ROM or BlueZone Image file.
NOTE The
BZDDE.H file is located in the DOCS
folder on the BlueZone CD-ROM
or BlueZone Image file.
SEE Please refer to Chapter
5 Configuring BlueZone and BlueZone Script
Host & Debugger Help for more information on using BlueZone
with HLLAPI.
Click here to Launch BlueZone Script Host & Debugger Help from the Seagull Software Web Site.
BlueZone and BlueZone Web to Host have many 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 create scripts or applications used by others in the enterprise.