Command line to open CoolTerm instance connected?

If you have specific questions or problems with any of my Freeware applications, post them here.
User avatar
roger
Site Admin
Posts: 536
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Command line to open CoolTerm instance connected?

Post by roger »

jmuhammad wrote: Sat Nov 08, 2025 1:53 pm I have to have CoolTerm open first before the 'type: s = CoolTerm.CoolTermSocket()' would connect (i.e. that is what I did after the ERROR message you see below):
Ah, yes, CoolTerm needs to be running before it can accept socket connections.
User avatar
roger
Site Admin
Posts: 536
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Command line to open CoolTerm instance connected?

Post by roger »

jmuhammad wrote: Sat Nov 08, 2025 2:51 pm I combined Examples 2,3,12 and got it working. The key is (at least for me) CoolTerm has to be running to connect a socket then load the settings file.

I just need to learn how to further control CoolTerm with the socket. But for this project -- despite the need for hard-coded delays because I don't know when it is ready -- this will do. I have an option to do it all in Python rather than ahk+python.
Great! I'm glad you got it working!

The learning curve for this shouldn't be too bad. You'll find that you can do almost anything with scripting that you can do via the CoolTerm GUI. Please post back to the forum if you have any further questions.

Roger
jmuhammad
Posts: 21
Joined: Wed Aug 17, 2022 10:21 pm

Re: Command line to open CoolTerm instance connected?

Post by jmuhammad »

FYI, in CoolTerm.py:
SerialPortName(SerialPortIndex as integer) as string: Returns the name of the serial port with the specified index.
should be:
GetSerialPortName(SerialPortIndex as integer) as string: Returns the name of the serial port with the specified index.
User avatar
roger
Site Admin
Posts: 536
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Command line to open CoolTerm instance connected?

Post by roger »

Thanks for the heads up.

SerialPortName() is actually the name used internally and with AppleScript. The documentation is correct. I will add the SerialPortName() call to CoolTerm.py in addition to GetSerialPortName() in order to not break any scripts anybody has written. Both will work and do the same.
The same applies to SerialPortCount() and GetSerialPortCount(). The next CoolTerm release will include the updated CoolTerm.py module.

Meanwhile, I have attached the updated CoolTerm.py (remove the .txt extension):
CoolTerm.py.txt
You do not have the required permissions to view the files attached to this post.
Post Reply