You are welcome
Just an example using your first script:
Local $ODBC = "LocaHost"
Local $ODBC_IP = "10.10.1.10"
Local $RPC_Port = "135"
Local $SQL_Port = "1825"
Local $LS_Port = "1234"
Local $aPorts = [$RPC_Port, $SQL_Port, $LS_Port]
TCPStartup()
For $i = 0 To UBound($aPorts) - 1
$iSocket = TCPConnect($ODBC_IP, $aPorts[$i])
If @error Then
ConsoleWrite("No luck connecting to " & $ODBC & "/" & $ODBC_IP & " on port " & $aPorts[$i] & @CRLF)
Else
ConsoleWrite("Yeah, I've connected to " & $ODBC & "/" & $ODBC_IP & " on port " & $aPorts[$i] & @CRLF)
EndIf
TCPCloseSocket($iSocket)
Next
TCPShutdown()