As an embedded software engineer, I frequently utilize serial connections to embedded devices, often using virtual USB COM ports. This resulted in a pain point that I set out to resolve by good ol’ hacking.
Oftentimes, I am connected to a device’s USB COM port with Tera Term and then need to reset the device. When I do that, the virtual USB COM port is also reset. Therefore, each time I reset a device, I have to manually disconnect the Tera Term COM port, reset the device, wait for the USB COM port to enumerate, and then manually reconnect with Tera Term. This is a relatively small thing, I know, yet when you do this many times a day, it really adds up.
To solve this problem, I wrote an AutoHotkey script for Windows that automatically disconnects Tera Term if the connected to port goes away and then automatically reconnects Tera Term if that port comes back.
To use it, you just need to install AutoHotkey and download this script. First open the script in a text editor and set the COM ports that you want to monitor, and then double-click the script to start it (placing a shortcut to it in your Startup folder will cause it to auto load on boot).
P.S. AutoHotkey is an amazing program for Windows that you can use to create custom keyboard shortcuts, text abbreviations, and even remap your keyboard to be more user-friendly (future blog post!).