BlueZone Scripting

Chapter 10

Introduction to BlueZone Scripting

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

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:
Disadvantages of BlueZone Macros are:

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

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.

BlueZone Script File Extensions

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 Script Format

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.

Advantages of BlueZone Proprietary Scripts are:

SEE  Controlling Scripting Access for more information on this feature.

Disadvantages of BlueZone Scripts are:

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

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.

Advantages of BlueZone Text Based Scripts are:
Disadvantages of BlueZone Text Based Scripts are:

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

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.

Advantages of BlueZone Scripting Host are:
Disadvantages of BlueZone Scripting 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  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.


Conclusion

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:

OLE Automation

Controlling Script Access

Controlling Script Passwords