This is a thread where everybody is invited to share AppleScripts they've written for CoolTerm.
I'll start with a blog post I've come across this year. It was written by Ashley Hughes and discusses using AppleScript with CoolTerm for datalogging.
http://ashleyhughesarduino.wordpress.co ... escript-2/
Cool AppleScripts for CoolTerm
- roger
- Site Admin
- Posts: 503
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
-
- Posts: 1
- Joined: Wed Oct 19, 2016 8:22 am
Re: Cool AppleScripts for CoolTerm
I have modified Roger's original script to enable input into excel and into google chrome. I also changed the way that the loop was done so that the applescript could be compiled into a clickable program. These are available at https://github.com/MaloofLab/PlantMeasurement
-
- Posts: 1
- Joined: Thu Aug 20, 2020 8:44 am
Re: Cool AppleScripts for CoolTerm
I wrote a little AppleScript to:
-Scan the Serial Ports
-Connect to each serial port and perform a task
-Repeat for full list of Serial Ports
Took me a bit of fiddling, but figured it out and wanted to share. If you want it to just continuously run, you could put another Repeat loop around it. For example, I am using this to talk to a bunch of different microcontrollers over a USB Hub and check the status.
-Scan the Serial Ports
-Connect to each serial port and perform a task
-Repeat for full list of Serial Ports
Took me a bit of fiddling, but figured it out and wanted to share. If you want it to just continuously run, you could put another Repeat loop around it. For example, I am using this to talk to a bunch of different microcontrollers over a USB Hub and check the status.
Code: Select all
tell application "CoolTerm"
set w to LoadSetting stcLocation.stc #my directory path is inserted here normally
RescanSerialPorts
set portCount to (SerialPortCount)
set currentPort to GetCurrentSerialPort (w)
repeat with n from 0 to portCount
Disconnect (w)
SetCurrentSerialPort {w, (portCount - n)}
set currentPort to GetCurrentSerialPort (w)
Connect (w)
#Operational code for my intended use
end repeat
end tell
-
- Posts: 11
- Joined: Sun Sep 24, 2023 10:04 am
Re: Cool AppleScripts for CoolTerm
I use Sublime Text (ST) for writing MicroPython programs. ST has a build system which allows you to write simple scripts to automate the steps required to create an application. In the case of MicroPython, the steps are:
1. Disconnect CoolTerm
1. Upload file(s)
1. Connect CoolTerm
The Applescript capability of CoolTerm makes this a game-changer, in that it allows the automation to have some intelligence to determine if CoolTerm is running and if it's connection state.
I have a write up here: https://github.com/lkoepsel/mpython_Automation
1. Disconnect CoolTerm
1. Upload file(s)
1. Connect CoolTerm
The Applescript capability of CoolTerm makes this a game-changer, in that it allows the automation to have some intelligence to determine if CoolTerm is running and if it's connection state.
I have a write up here: https://github.com/lkoepsel/mpython_Automation
- roger
- Site Admin
- Posts: 503
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: Cool AppleScripts for CoolTerm
Very cool!
Thanks for sharing!
Roger
Thanks for sharing!
Roger