I spent a couple of hours this morning writing a little program using Lazarus / Free Pascal called krun. I will use it to run certain ham radio programs that I use with my Elecraft K3, hence the name beginning with K like my other Elecraft-related programs. In principle though it could be used with other radios, if their command language uses only printable characters.
What krun does is connect to the radio using the serial port and send a sequence of CAT commands to it. It will then run a specified program. It waits in the background until the specified program is finished and can then (optionally) send another sequence of commands to the radio before closing. The com port, baud rate, command sequences and path to the program you want to run are all specified on the command line.
The main reason for writing krun was to facilitate the use of packet radio software with the K3. The SV2AGW Packet Engine doesn't support CAT at all so it can't set the K3 into the right mode for packet operation. For VHF packet you must use FM, but with the transmit audio coming from the line input. It's hard to remember to switch the audio to line input before using packet and then remember to switch it back again for normal phone operation afterwards, so I often ended up transmitting a signal with no modulation. krun should prevent that. As a bonus it can set the frequency, mode and power level as well, so setting up for packet is almost a one-click operation.
I haven't made krun available on the website as it takes time to document and upload it and it probably won't be of use to very many people. But I may get round to it eventually, if anyone expresses a need for it.