Help with AutoIt and to get port number

Hi all,

If anyone has any experience with AutoIt I could use some help. I have been on the AutoIt forum but my knowledge of the windows environment is very limited as well as AutoIt. So my questions to their forum may not be that clear.

Here's what I am trying to do. When each board is first connected a com# is assigned to it. So when I switch between boards I have to go to device manager>ports to find the port#. So I thought that it should be possible to have a script running (on Win7) that will detect when any of my Arduino's are plugged into the USB port and show as a small popup the port#. AutoIt has a ToolTip that does this nicely. It can follow the mouse pointer as well which is kind of neat. The problem is to display the number of the port.

BrayTerminal has the ports grayed out for the ports that aren't available, so with that idea there must be something in windows that would have that info, I just don't know what that is.

First problem is if it's possible? - I think it should be.

I don't know if I need a dll to accomplish it? - Hopefully not because I know nothing about dll's.

And please don't tell me to put stickers on each board ;) that's not the point.

Thanks

It is possible (from a Windows API perspective) (and a very clever idea). What you need from AutoIt... • USB insertion notifications (this would probably be implemented as a "callback") • Serial port enumeration • Persistence (it has be able to remember the serial port list before the notification)

I don't know anything about AutoIt, but you can look at https://github.com/WestfW/ArduScan Aside from the rather questionable C++ code, it has links to what should be useful references.

Just shy of 7 years and I found it. Someone at Helm PCB did just that, a Serial Port Notifier that works nicely.

Here's the link if anyone is interested; Serial Port Monitor