Tera Term Macro has limited support for writing reusable code. It is possibleto include a file but it is not possible to use a goto or callcommand to easily jump to a specific block of code in a file.

subroutine.ttl emulates a function call syntax and allows you to write moremodular, compartmentalized code. For example, given two files (main.ttl andutil.ttl), you could write something like this in main.ttl:

This will call the clear_system_logs subroutine in util.ttl:

subroutine.ttl requires Tera Term version 4.66 or higher. It is licensed underthe terms of the MIT license.See LICENSE.txt for the full text of the license.

You will need to copy subroutine.ttl into your source code directory and copythe following code to the top of each of your modular .ttl files:

In Tera Term I use the Serial Port to send commands to the board in order to log in and run certain settings that I want. Instead of typing these commands each time I test a board I want to create a program that sends these commands without the requirement to type them again and again each time.

Then, back in main.ttl, set the callsub variable. You can use one of thefollowing formats:

  • <include file>:<goto label>
  • <include file>

If the goto label is not specified, the hook code above will call the defaultsubroutine. For readability, you can also leave the '.ttl' extension off ofthe filename.

Second, include subroutine.ttl in your main file.

As much as possible, subroutine.ttl attempts to avoid throwing errors. To avoiderrors, it attempts to detect errors before they happen and will return anerror code in the result variable. It also defines several constants thatyou can use for more readable error checking. For instance:

Here is the complete list of error code constants and their meanings:

Constant nameMeaning
CALLSUB_IS_NOT_DEFINEDThe callsub variable has not been set.
CALLSUB_IS_NOT_A_STRINGThe callsub variable is not a string.
CALLSUB_IS_EMPTYThe callsub variable is an empty string.
GOTO_LABEL_NOT_DEFINEDThe specified goto label is not valid.
INCLUDE_DEPTH_EXCEEDEDThe maximum include depth (9) has been exceeded.
INCLUDE_FILE_NOT_FOUNDThe specified file does not exist.

Tera Term is designed so that everything is in a global namespace. Because ofthis, it's possible to treat subroutines like functions. For instance, you candefine argument variables before calling a subroutine and check returnvariables defined in the subroutines. For instance:

It's also possible to modify subroutine.ttl to automatically add a directoryprefix to all of the filenames by changing the __include_filename variable.For instance, if you have a directory structure like this:

You can change the __include_filename variable from ' to'includes':

Multimedia |Business |Messengers |Desktop |Development |Education |Games |Graphics |Home |Networking |Security |Servers |Utilities |Web Dev| Other
Sort by: Relevance

Tera Term

Tera Term is a terminal emulation program that allows you to connect to Linux boxes.Main Features:- Serial port connections.- TCP/IP (telnet, SSH1, SSH2) connections.- Log replaying.- Named pipe connection.- IPv6 communication.- VT100 emulation and selected VT200/300 emulation.- TEK4010 emulation.- File transfer protocols (Kermit, XMODEM, YMODEM, ZMODEM, B-PLUS and Quick-VAN).

  • Publisher: T. Teranishi
  • Home page:ttssh2.sourceforge.jp
  • Last updated: October 3rd, 2015
Tera term serial port

TTLEditor

TTLEditor is a plain text editor with Tera Term Macro language syntax highlighting and syntax completion proposal features. TTLEditor is similar to the Macro Editor built into LogMeTT Configuration utility and may be used when there is no need in complex hierarchical macro structures. The name 'TTLEditor' indicates that this editor is built specially for creating and updating .TTL files.

  • Publisher: Boris Maisuradze
  • Last updated: September 17th, 2013

Spreadsheet1.com - Macro Mover

Macro mover provides an easy way to distribute your VBA projects to other Office users is to create an add-in.Macro Mover add-in powered by Ribbon Commander allows Excel users to move entire VBA projects from one workbook to another within seconds. Forget what you knew about exporting and importing modules from within the Visual Basic Editor (VBE).

  • Publisher: Esoteric Consulting Ltd
  • Home page:www.spreadsheet1.com
  • Last updated: October 30th, 2017

Perfect Keyboard

Type fast, fill forms, and automate data entry of all kind with this text expander for Windows. Perfect Keyboard brings users faster and error free typing, complete Windows automation and reliable processing of repetitive tasks of all kinds.

  • Publisher: Pitrinec Software
  • Home page:pitrinec.com
  • Last updated: May 18th, 2017

Macro Toolworks, Professional Edition

Create macros working in any Windows application and trigger them using hot-key or text shortcut, from custom toolbar, by defined mouse action, at scheduled time or when specific event occurs. 300+ commands available!

  • Publisher: Pitrinec Software
  • Home page:www.macrotoolworks.com
  • Last updated: November 15th, 2016

AutoHook 2007

AutoCAD power users know that the keyboard is the fastest interface available for working with AutoCAD. AutoHook makes the fastest even faster by allowing you to customize your keyboard (and mouse!) quickly and easily. AutoHook now supports powerful macro commands that allow pausing for user input, macro looping, and sending special keys and mouse clicks to AutoCAD.

Tera Term Macro File

  • Publisher: Command Digital Studios
  • Home page:www.command-digital.com
  • Last updated: December 26th, 2008

FTPShell Client

Enables creation of FTPShell scripts for automated and reliable file transfers. FTPShell Script is easy to use and supports basic constructs for looping, conditional execution, list manipulation, and wildcard matching. It also supports several macro commands for file processing and secure file transfers using SSL/TLS (FTPS) or SSH (SFTP).

  • Publisher: FTPShell Software
  • Home page:www.ftpshell.com
  • Last updated: October 27th, 2011

AeroDuct

This calculation program on Excel makes it possible to dimension and carry out the calculation of the pressure losses on the ductworks and air distribution systems.

  • Publisher: unknown
  • Home page:www.thermexcel.com
  • Last updated: March 31st, 2008

COUGAR UIX SYSTEM

COUGAR UIX SYSTEM is a free program that enables you to configure the COUGAR 600M Gaming Mouse. The program allows you to create various gaming profiles depending on the games that you are playing, you can assign macro commands according to your preferences, set the DPI levels and the mouse sensitivity.

  • Publisher: Cougar
  • Home page:www.cougar-world.com
  • Last updated: January 13th, 2015

TeraTerm Pro

TeraTerm Pro Web is the next generation tool for connecting with remote Telnet and SSH hosts. It is built based on the extremely popular open-source TeraTerm product put out by T. Teranishi in 1999 (click here for original site). In keeping with the original philosophy and spirit of the author, this modified version is completely free!!

  • Publisher: Ayera Technology,INC.
  • Home page:www.ayera.com
  • Last updated: February 3rd, 2010

Antechinus JavaScript Editor Pro

Add JavaScript code to your HTML pages quickly and easily - giving your Web creations a real edge. Antechinus transforms your pages from displaying static content to live, dynamic, interactive applications.

  • Publisher: C Point
  • Home page:daoinwod.com

Macro Recorder

Macro Recorder is an automation utility created for users who need to record keyboard and mouse activities as macros for later. This program might prove to be of good use if you need to complete repetitive tasks on your Windows PC.The application comes with a user-friendly interface, features easy-to-configure recording settings, and allows you define global hotkeys.

  • Publisher: JitBit Software
  • Home page:www.jitbit.com
  • Last updated: February 3rd, 2016

Jitbit Macro Recorder

“Jitbit Macro Recorder” is a program that does more than it says on the tin. It records and plays keypresses and mouse movement and clicks; and also acts as an automation tool and an EXE compiler. I like this program because I can record macros of my routine tasks or create macros from scratch using the macro editor

  • Publisher: JitBit Software
  • Home page:www.jitbit.com
  • Last updated: September 11th, 2018

Pulover's Macro Creator

Pulover’s Macro Creator is an open source automation tool and script generator. It is based on AutoHotkey language and provides users with multiple automation functions, as well as a built-in recorder.Main features:- Mouse & keyboard.- Control commands.- Window commands.- Image & pixel search.- Loops.

  • Publisher: Pulover's Macro Creator
  • Home page:www.macrocreator.com
  • Last updated: December 13th, 2016

Macro Toolworks

Teraterm Macro Examples

Macro Toolworks is a powerful all-in-one automation software for Windows. It allows users to record macros, create macros (300+ commands available) in a easy to use macro editor, and playback macros in any application or web page.

  • Publisher: Pitrinec Software
  • Home page:www.pitrinec.com
  • Last updated: May 18th, 2017

Macro Mania

Macro Mania is a tool designed to automate various types of tasks and increase productivity in different environments. The program enables you to launch programs and automatically send keystrokes or mouse commands, schedule macros to run unattended and much more.

  • Publisher: NorthStar Solutions
  • Home page:www.nstarsolutions.com
  • Last updated: March 16th, 2015

TERA

TERA’s action combat system makes battles come alive. Instead of mindlessly mashing keys while grinding through monotonous content, players jockey for position, aim at moving targets, dodge incoming attacks, and time combos carefully to deal massive damage.

  • Publisher: Bluehole Studio Inc
  • Home page:tera.enmasse.com
  • Last updated: October 12th, 2017

Tera Term Serial Macro Examples

Macro Scheduler

How To Use Tera Term Serial Connection

Macro Scheduler is the computer automation tool that has been chosen by home users, small businesses, and big companies alike. Macro Scheduler's intuitive MacroScript language was designed specifically for automating Windows applications. By operating at the user level it is application-independent and allows automation of repetitive, time consuming tasks.

Tera Term Serial

  • Publisher: MJT Net Ltd
  • Home page:www.mjtnet.com
  • Last updated: March 27th, 2013

Tera Term Serial Communications