2 tera term application process within winform
-
I was able to get 2 seperate processes to run the tera term applications within WinForm successfully. I have a DUT that has 2 ports and each process to communicate with one of the port. Manually sending the command within the tera term process window works well. However, I have the list of commands using DataGridView above two terminals. I was planning on having the user to click on the command from the datagridview and send the command to one of the tera term process. I'm not sure on how to issue the command string to the process. Been searching online and wasn't sure on how to do this. Any ideas? If you want me to plug in the code, I would be happy to do so with what I did.
-
The easiest way is not to try to “type” into Tera Term, just use its macro support. From your DataGridView click event, generate a .ttl file like:
sendln "your command here"
Then run it with:
Process.Start("ttpmacro.exe", "myscript.ttl");
That’ll send the command straight into the right Tera Term session. If you don’t need Tera Term at all, just use SerialPort.WriteLine() in C# instead.