s there a way to do it using only AutoIt and the Tera Term macro? I'd prefer not to use enumser
Well, sure. Modify the AutoIt script above to close the window instead of hit "OK" at the end. Then have it wait for the serial port setup dialog box and select the appropriate COM port that it parsed out of what it got from controlgettext.
The TeraTerm script will first start the AutoIt script, open the New Connection, then the serial port setup dialogs. It will depend on the AutoIt script to close each of them.
Sorry but I'm not at all familiar with AutoIt. It's also unlikely that I'll ever use it again. How would I determine the COM port number associated with the text "USB Serial Port", and then write this to a file that's in the same directory as the macro?