Jump to content

select com port and show what device is connected to it

Recommended Posts

hi  am new and i just started learning autoit

am starting to do a little program that can help me in my work

i dont know how to do it correctly : a combobox that shows what com port are connected to devices in the computer and when i choose a port and click on a button called info_port  i want that he desplay in $result the name of the device connected to the choosen com port.

i want to use this file to help me : CommMG.au3


#include 'CommMG.au3' ;comm ports library
Global $result = GUICtrlCreateEdit("", 364, 135, 568, 595)
Global $info_port = GUICtrlCreateButton("Info", 291, 85, 56, 25)
Global $Port = GUICtrlCreateCombo("", 150, 85, 135, 24)
$portlist = _CommListPorts(0)

If Not @error = 1 Then
    For $pl = 1 To $portlist[0]
        GUICtrlSetData($Port, $portlist[$pl])

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...