I feel quite useless with Teraterm.
I tried to create a simple macro macro.ttl that sends some stupid commands:
connect '/C=3'
sendln '?'
sendln '|3'
in order to: connect '/C=3'- connect to Port 3 (althought it´s already in the config), sendln '?' - display help, sendln '|3' - enter this menu, etc.
This works when I open Teraterm and go to Macros and open the file but my problem now is how to handle this from the cmd window. I tried this:
start ttermpro.exe TTPMACRO "Teraterm_macros\macro.ttl"
basically: start Teraterm, open the macro and path and file name of the macro file. But it reports error:
Invalid host
Any hints, please? Thnx
I thought about writing all the steps I followed just in case that someone like me (kind of d umb) was struggling with the same:
1 - Relate the .ttl with the Teraterm macro application:
1a - I went to my macro, click R-mouse, "Open with...", "Choose another app", "More apps", "Look for another app in this PC" and checked box "Always use this app to open .ttl files".
1b - I could not find the app first, then I found it in c:>Program Files (x86)> teraterm and selected the executable "ttpmacro.exe".
2 - Modify the macro to start the communication because Teraterm has to be closed for this to work, so when the macro starts Teraterm you need to specify the port:
2a - I added in my Teraterm macro: connect '/C=3' (in my case I connect Teraterm with COM port 3)
2b - Whole macro: it looks like this:
This connects through com port 3 and then enters one menu and sends c and then 3. So now if I double click on the macro it executes the macro alone.
3 - Script to run the macro: Also I decided to create a batch file to run it from CAPL, and I did this:
3a - first close Teraterm if it´s already opened because the teraterm exe and the macro exe can´t connect at the same time:
ttermpro.exe is the application name that runs when starting Teraterm normally.
3b - Start the macro:
So it looks like this:
4 - I call it from CAPL because what I want is to include this macro is one test: I add this line:
this in CAPL opens the batch file. It could open directly the macro but I wanted to have a bat script so that I can add stuff like closing teraterm if it´s already open among other things.