Hi all,
I didn't find any posts to this issue, but if there is any please point me to them.
I am trying to piece together a script that will display the com# of an Arduino board when it gets plugged in.
I've 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 in and show a small popup with 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 getting the number of the port.
If anyone has AutoIt installed they can try this little script to see what I'm after:
$j = Random(1,6,1)
For $i = 1 To 200
ToolTip("COM" & $j)
Sleep(10)
Next
I have also spent time looking around at PowerShell, but get lost in the huge amount of info there
I don't know what area to look at. I see stuff like WM_DEVICECHANGE, RegisterDeviceNotification, handles, events, etc.
When I'm using BrayTerminal the ports that aren't available are grayed out, so with that idea there must be something in windows that would have that info, I just don't know what that is.
First I need to know 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.
I am hoping to find a small example script that can output (anything at this point) when a device is plugged in and output that to a MsgBox, console or something.
Any assistance would be appreciated.