BlueZone Scripting

Chapter 10

Introduction to BlueZone Scripting

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

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.

Advantages of BlueZone Macros are:
Disadvantages of BlueZone Macros are:

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.


BlueZone Scripts

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.

Advantages of BlueZone Scripts are:
Disadvantages of BlueZone Scripts are:

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

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.

Advantages of BlueZone Script Host are:
Disadvantages of BlueZone Script Host are:

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.


BlueZone Host Automation Object

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.

Advantages of using BlueZone Host Automation Object are:
Disadvantages of using BlueZone Host Automation Object are:

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 HLLAPI Support

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.

The advantages of using HLLAPI are:

The disadvantages of using HLLAPI are:

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.

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 DDE Support

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.


Conclusion

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.