TTerm Connect: The Power of Macros

Sometimes there’s a need for automating tasks and enhancing the user interface of a host session. One of the ways this can be achieved in TTerm Connect is through the use of TTerm Connects built in Macro language. In this article we’ll look at displaying a custom message for users on login to a host system using TTerm Connects built in Macros.

TTerm Connect About TTerm Connect
TTerm Connect is Turbosoft’s terminal emulator for the web. Built on common web technologies and standards such as HTML5 and JavaScript, TTerm Connect requires no Java, no ActiveX controls and no end user installation. Connect your users with nothing more than a modern web browser, on a desktop or on the go.

Macros in TTerm Connect

The TTerm Connect Macro language is designed to be flexible, powerful and easy to use. To make building multiple step macros even easier, a Macro Assistant is included, helping an administrator to build up a complex chain of tasks simply by selecting from a pre-defined list of macro functions. Of course, typing a macro directly is possible too, if that’s your preference.

Macros can be used all over TTerm Connect, they can be attached to specific events, like connections, disconnection or the opening of a profile (ie, before a host connection is attempted). They can be attached to keystrokes or hotspot buttons, they can execute when a particular host screen is determined to have appeared on an end users display. Throughout the TTerm Connect profile configuration you’ll see the light globe macro assistant button attached to various items such as here, on the Startup Macro setting.

TTerm Connect startup macro

The startup macro executes when a session is opened, but before a connection is made.

In this example, we’ll add a macro which displays a simple message when a user successfully connects to a host system. In this case we want to display a welcome message and direct a particular group of users to a helpdesk phone and email if they have issues with the system. In TTerm Connects desktop client, the end result will look like this on a desktop:

TTerm Connect Desktop Client

The TTerm Connect Desktop Client displaying a dialog box, spawned by a macro.

TTerm Connect Desktop Client on a mobile device.

The same connection on a phone screen.

The TTerm Connect desktop client is only one of several deployment options, an alternate way of connecting to a host system is to embed TTerm Connect directly into a website such as an intranet page. In such a case the result might look something like this when using default, plain, unmodified styling:

TTerm Connect embedded in a web page.

TTerm Connect session embedded in an empty webpage with a default dialog.

The appearance of the dialog box (or even, whether it appears at all) can be customized.

Creating the Macro

Creating this welcome message is very simple. First, edit or a create a profile (a profile is TTerm Connects name for a host session configuration) in the TTerm Connect Administration portal. Open the General tab and scroll down to the connect settings section and the Connect Macro field.

You can enter a macro directly in the input field, or click/tap the button to launch the macro assistant as shown in the screenshot above.

TTerm Connect Macro Assistant.

TTerm Connects Macro Assistant helps build complex macros easily.

Click insert to add a new macro token and, under token detail, set the type to Function and the function to MsgBox. MsgBox is TTerm Connects macro function for displaying a dialog box, it takes a single text parameter, that being the message displayed on screen.

Enter a text message, click Save and the Macro Assistant will close. You’ll see the raw macro as text on the connect macro item. Ensure the rest of the profile is configured as required an save the changes.

And that’s it! Now once your end user connects to the host system they’ll see the message.

What Next With Macros?

Displaying a message is the simplest of examples. TTerm Connects Macro language contains a huge number of built in functions, logic handling, the ability to send emulation keystrokes, strings and characters to the host - Macros can even be host initiated. As an aside TTerm Connects Macro language is the same as found across the Turbosoft Product range so a macro written for our Windows terminal emulator TTWin4 will, in most cases, work as written in TTerm Connect too.

For adding automation and enhancing the user interface Macros are a powerful tool and well worth considering.

Visit the TTerm Connect product page for more information on our web to host terminal emulator, or contact Turbosoft at for more information .

| | |