From Tera Term. To start MACRO (TTL), select the [Control] Macro command and then the macro file in the Open Macro dialog box.
The question is how to write command inside batch file, to call macro file and run automatically by just opening batch file.
This is the command from previous post.
"C:\Program Files (x86)\teraterm\ttermpro.exe" /I /C=1 /BAUD=115200 /M=C:\Users\Public\test_ttermpro.ttl
From my uderstanding, /M should be command to open macro file. But now, Teraterm is open but don't execute TTL file. Any idea on how to solve this issue?
Here the solution for my question. I create a batch file to execute ttpmacro.exe and .TTL file.
@echo on
start "C:\Program Files (x86)\teraterm\ttpmacro.exe" "C:\PCU_BOOTLOADER.TTL"
cls
File location might be different. Baudrate and COM port are set inside TTL file.
I don't know why that isn't working but maybe try:
cd C:\Program Files (x86)\teraterm
TTERMPRO /I /C=1 /BAUD=115200 /M="C:\Users\Public\test_ttermpro.ttl"
I believe using TTERMPRO, the path to the Macro must be in quotations
Personally, I'd utilize the TTPMacro.exe for this function and define the connection type and baudrate within the ttl, unless there is a reason they might change between executions of the TTL.
Doing it that way, within the .ttl script add near the beginning or where applicable:
connect '/C=1'
setspeed 115200
That will define the com port and baud rate of the connection
In the batch file:
cd C:\Program Files (x86)\teraterm
TTPMacro /I C:\Users\Public\test_ttermpro.ttl
来源:https://stackoverflow.com/questions/53058951/how-to-run-teraterm-and-ttl-file-using-batch-file