VBA Automation
As of version 4.8.2, TinyTERM Plus provides VBA automation capabilities for TN3270 and TN5250 emulation. The basic com interface for TinyTERM currently supports a single session.
Requirements
To use VBScript or VBA, you will need TinyTERM Plus version 4.8.2 (November 2013) or higher, installed on Windows XP or newer. VBScript must be enabled.
Alternatively, you can use a copy of Microsoft Office that supports VBA script creation. Not all Office editions do, so verify this in your documentation.
Testing the Environment
To test your environment, open a text editor and enter the following:
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = 1
objIE.Navigate "http://www.censoft.com"
Save the file as LaunchIE.vbs
. Double-click the file after saving. It should
open Internet Explorer and go to the
Century Software, Inc., home page.
A similar script can be used in any application that supports VBA.
Starting TinyTERM
Starting TinyTERM works in similar fashion, but uses a slightly different set of commands from Internet Explorer. The following instructions will demonstrate a TN3270 connection.
First, configure TinyTERM for TN3270 emulation. Save this as the default configuration in default.tpx.
Next, enter the following lines into a text file:
Set objTT = WScript.CreateObject("Century.TinyTERM")
objTT.Show()
Save this file as LaunchTT.vbs and run it. This should load TinyTERM and show it on screen.
Next, you can create a session object, which loads the appropriate ActiveX control. To do this add the following lines to the LaunchTT.vbs file:
Set objte = objTT.Control
objte.ConnectionType = 0
objte.node = "nerdc.ufl.edu"
objte.netport = 23
objte.connect()
Save the file, then double-click it again. As you can see, this should connect you to the
nerdc.ufl.edu system. The only supported command on that particular system is LOGOFF
.
Supported Commands
The full set of TinyTERM properties and methods is supported via VBA and VBS. For example, loading a new session uses the OpenSession property:
objte.OpenSession("orderentry.tpx")
Documentation for the properties and methods is in the Programmers Reference Manual PDF. Note that all examples in that manual use "te" as the object name. Replace that with the object name you've chosen with the Set command, as with "objte" in the examples above.
Sample Scripts
The following scripts demonstrate some of the capabilities of TinyTERM Plus when used with automation. Each is documented line-by-line, explaining what each command is intended to do: