Tera Term Macro Examples

Posted on
Tera Term Macro Examples 3,7/5 7587 reviews

I am having an issue trying to send custom macros outside of the ttermpro.exe directory Is there any way to set the macro directory prior to a command line launch? For example: subprocess.call(['C: Program Files (x86) teraterm ttermpro.exe','/C=COM1','/BAUD=115200', '/M=macro_outside_directory.ttl']) This is an example of the command I use to launch teraterm. I want to be able to run the macro_outside_directory without having to copy and paste the ttl file into the program directory. So that's why I was wondering if there was a way I could call setdir concurrently with the launching of teraterm via command line. Thank you for the help!

Jump to Sample Program in Teraterm macrolanguage - sample macro of Tera Term;; File: ssh2login.ttl; Description: auto login with SSH2.

Teraterm script commands

I am using a Tera Term over a serial port to do some testing on a board. Recently I found out I can do some scripting in Tera Term so I have been doing research to help automate and make testing a little easier. I know Tera Term has a site that lists example macros as well as a command list but I guess what I need is someone with experience scripting in Tera Term.

Example

Tera Term uses a sort of Basic language called Tera Term Language (TTL) but I found it hard from the site to actually identify which commands I needed to use. Tera term site. OK, I did some digging and found a moderately active forum: It is there that I found a nice thread called: TeraTerm Macro Language for dummies. That, and the command list on the actual TeraTerm project site is where I have been troubleshooting and solving 90% of my issues. To take in a user defined input you use the 'inputbox' command, which follows the format: inputbox 'message' 'title' [default] (not entirely sure what default is supposed to be doing) E.G. Inputbox 'Please type input' 'Input' a dialog box will appear and prompt a response.

This input is sent to a default variable inputstr I have gotten this variable to work in some cases but I think the problem is that the variable is technically a string type so I can't do traditional loops. Ines de la fressange pic. I need to figure out a way to use the str2int command to do an expression. I think that answers my own immediate question as well as provide some reference for others.