

May the source be with you, but remember the KISS principle -) Using teraterm API call 'setexitcode' to set WIndows system variable%errorlevel% requires 2 teraterm sessions to register 0 Teraterm Sendln issue, it cannot send the full command. MACRO (TTPMACRO.EXE) is an interpreter of the macro language 'Tera Term Language (TTL)', which controls Tera Term and provides various functions like auto dialing, auto login and so on. Just like the Tera Term:Send File dialog window works now. There would be a file name box so the user could enter a name and select the directory etc. When the 'receive now' button is pressed TeraTerm would send out a null code 00H to signal to the connected serial port peripheral to send the binary file.
