Maybe someone of you can need this: #include <Array.au3> Local $aComPort = _GetComPorts() _ArrayDisplay($aComPort) Local $sComPort = _GetComPorts("com1") If @error Then MsgBox(16, "Error " & @error, "No matching COM port found.") Else ConsoleWrite($sComPort & @CRLF) EndIf ; #FUNCTION# ==================================================================================================================== ; Name...........: _GetComPorts ; Description ...: Lists all com ports and t