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.
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.
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:
The TTerm Connect Desktop Client displaying a dialog box, spawned by a macro.
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 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 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.