Tera Term Macro Examples

Restores Tera Term if is greater than zero.6 disconnect' Example: connect 'host1' open a Tera Term window and link TTPMACRO to it unlink terminate the link connect 'host2' open another Tera Term window and link TTPMACRO to it.1.

The terminal emulation program Tara Term is an easy-to-use terminal emulator, similar in function to HyperTerminal or Procomm. But, Raveon finds it is easier to use, more reliable, and has better features. One of its new features is the ability to process a “Macro File”. It is a very handy program to communicate with a Raveon data radio modem, and is a good way to automate the configuing your radio modem. Tera Term is an open-source terminal emulation program that is easy to use, and very powerful.

Raveon recommends using it over Hyperterminal. Version 4.7 is currently available for download at logmett.com here: Tera Term has a Macro FIle script processor that allows a person to create a script file of macro commands.

The Script file can configure the radio modem, prompt the user for input, and validate the programming of the radio modem. Tera Term Macro files have an extension.TTL. When in install Tera Term, the.TTL extension will be associated with Tera Term, so anytime you click on a.TTL file, the Tera Term maco processor should run it. If it does not, you can manually associate the “TLL” file as described below. The macro File with the.TTL extension must be created before you can run it. Raveon may provide this for you, or you may create this yourself. Information about Tera Term’s Macro abilities is here: although you may have to search the Internet for more details.

A good way to understand it, is to study a macro file provided by Raveon. When you run a macro file, there will be at least two windows pop-up, and maybe three windows. The largest window is the Tera Term program itself. As the macro runs, there will be a small window titled MACRO – xxxxx where xxxxx is the name of the macro file that is running.

You can pause or end the macro execution by clicking on a button on this window. At various plces in the macro file script, the user may be promoted to enter a paramter, or answer yes/no to a question. A good practice at the end of the script is have the macro script close Tera Term so another script may be started. How to associate “TTL” files with MACRO Since Tera Term 4.59, you can associate “.TTL” files with MACRO with installer. To associate the file extension “.TTL” with MACRO, do the following steps.

• Execute the [View] Options command of Explorer. • Select the “File Types” tab. • Click the “New Type” button and specify items like the following. Description of type: Tera Term macro files Associated extension: TTL • Click the “New” button and specify items like the following. Action: Execute Application used to perform action: 'C: Program Files teraterm ttpmacro.exe' '%1' (If Tera Term Pro is installed in C: Program Files teraterm.) • Close all the dialog boxes by clicking “OK” buttons. Macro Example Below is a simple example macro script to program a Raveon M7 radio modem. CONNECT '/C=1' SEND '+++':START;READ UNIT ID PAUSE 1 SENDLN 'MYID' PAUSE 1 yesnobox 'CHANGE UNIT ID?'

'CHANGE UNIT ID?' If result goto CHANGEID GOTO DESTINATION:CHANGEID;CHANGE UNIT ID inputbox 'ENTER UNIT ID' 'MYID' SENDLN 'MYID ' INPUTSTR:DESTINATION;READ DESTINATION ID PAUSE 1 SENDLN 'TOID' PAUSE 1 yesnobox 'CHANGE DESTINATION ID?' 'CHANGE DESTINATION ID?' If result goto DESTID GOTO RXFREQ:DESTID;CHANGE DESTINATION ID inputbox 'ENTER DESTINATION ID' 'TOID' SENDLN 'TOID ' INPUTSTR:RXFREQ;READ RX FREQ PAUSE 1 SENDLN 'ATFR' PAUSE 1 yesnobox 'xxx.xxxx' 'CHANGE FREQUENCY?' If result goto SETFREQ GOTO ECHOSTEP:SETFREQ;CHANGE FREQUENCY inputbox 'ENTER FREQUENCY' 'ATFX' SEN DLN 'ATFX ' INPUTSTR;SET ECHO ON:ECHOSTEP SENDLN 'ATE 1';SET CARRIER DETECT TO SHOW ON-LINE STATUS (BASE AND REMOTE) SENDLN 'ATR1 2' PAUSE 1;SET ON-LINE AFTER DIAL (DISABLED ON BASE ONLY) SENDLN 'ATCS 0' PAUSE 1 SENDLN 'SHOW' PAUSE 2 yesnobox 'Y'= FINISHED, 'N'= RESTART' 'ALL PARAMETERS CORRECT?'

If result goto CLOSE GOTO START:CLOSE disconnect 0;disconnect from teraterm, no confirmation closett;close tera term window END Tera Term Macro Language Information Following is a quick overview of the Tera Term Macro Language. Identifiers and reserved words 1) Variable identifiers The first character must be an alphabetic (A-Z, a-z) or an underscore character '_'. Subsequent characters can be alphabetic, underscore or numeric (0-9). Download fnet turbohdd usb serial key. Variable identifiers are not case sensitive. The maximum length is 32.

Example: VARIABLE _flag 2) Label identifiers Label identifiers consist of alphabetic, underscore or numeric characters, and are not case sensitive. The maximum length is 32. Example: label1 100 3) Reserved words The following words are reserved: [Command] bplusrecv, bplussend, changedir. (see the ) [Operator] and, not, or, xor [System variable] groupmatchstr1, groupmatchstr2, groupmatchstr3, groupmatchstr4, groupmatchstr5, groupmatchstr6, groupmatchstr7, groupmatchstr8, groupmatchstr9, inputstr, matchstr, param2, param3, param4, param5, param6, param7, param8, param9, result, timeout, mtimeout Line formats There are four kinds of line formats for macro files. Any line can contain a comment which begins with a ';' character. Also, a user can use the C language style comment(/* - */).

Related Post