Introduction to 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 Macro Keystroke Recorder

IMPORTANT!  Starting with BlueZone version 5.1, the ability to record and playback BlueZone Macros has been removed from the BlueZone MenuBar.  However, this feature is still available for those customers who would like to make this feature available to their end users.  If the Macro menu item does not appear  on your BlueZone MenuBar, please contact the BlueZone administrator your company or organization.

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  Using the Display Interface - BlueZone Macros for more information.


BlueZone Recorded Scripts

BlueZone Recorded Scripts can be recorded in either BlueZone proprietary format, BlueZone Basic, 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 BlueZone Basic scripts, VBScripts or JavaScripts.

BlueZone text based scripts are targeted at users who wish to leverage their proficiency with either BlueZone Basic, VBScript or JavaScript and want to take advantage of being able to write and edit 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 Recorded Script File Extensions

File Extension

Script Type

.BZS

BlueZone Proprietary Script

.VBS

VBScript

.JS

JavaScript

.BBS

BlueZone Basic Script

 

The pros and cons of BlueZone proprietary formatted vs. BlueZone Basic 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 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:

Disadvantages of BlueZone Scripts are:

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.

BlueZone Script Host & Debugger is discussed in more detail in the BlueZone Script Host section below.

Advantages of BlueZone Text Based Scripts are:

Disadvantages of BlueZone Text Based Scripts are:

SEE  Using the Display Interface - BlueZone Scripts for more information.


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 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:

Disadvantages of BlueZone Script Host are:

SEE  Help for the BlueZone Script Host, the BlueZone Script Host & Debugger and also the BlueZone Dialog Editor, can be found in the BlueZone Advanced Automation Guide.

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 Basic

BlueZone Basic is a Visual Basic for Applications VBA and VBScript compatible Basic Scripting Language which can be used to add functionality to the BlueZone family of terminal emulation clients or Web pages to automate complex tasks. Users can also create scripts for launching and manipulating other applications via OLE Automation or external DLL's. BlueZone Basic is a complete programming language.

BlueZone Basic also supports the VBScript interface so that customers who are using VBScript can upgrade with no source code changes. BlueZone Basic is the complete solution for your scripting language needs.

BlueZone Basic supports a substantial subset of Visual Basic for Applications. In addition, BlueZone Basic supports Microsoft Word Dynamic Dialogs, offers full OLE support, fully interacts with Dynamic HTML forms, and has a powerful API, that's easy to learn and easy to integrate. Through the BlueZone Basic API you can share variables, objects, and functions with your application. BlueZone Basic scripts can get and set properties and call methods or objects in your application. Callbacks can be registered so that your application can respond to compile and runtime events such as undefined variables, functions and data types. In addition, BlueZone Basic has the ability to save and load compiled scripts, supports UNICODE, and can handle huge scripts (all with a footprint of about 400k).

End-users can call functions that are embedded in DLL's or in the calling EXE. These functions must first be declared using the hidden but standard Declare Statement syntax. By building a string containing the declare statements and appending it prior to executing the user's script, these functions will appear to be built into the BlueZone Basic language and can be used on demand by your end users. New functions and subroutines can be added or redirected at runtime though BlueZone Basic's powerful API.

BlueZone Basic Features

SEE  Help for the BlueZone Basic, can be found in the BlueZone Advanced Automation Guide.

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.


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