rayane888 Posted February 11, 2018 Share Posted February 11, 2018 [HIDE-THANKS] ; Level-23 Tutorial #include "inet.au3" #include "array.au3" #include #include #include #include #include #include #include 'string.au3' #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("888 Network Scanner Autoit Tutorial", 651, 304, -1, -1) $ListView1 = GUICtrlCreateListView("IP|Name", 16, 16, 481, 273) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 190) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 190) $Button1 = GUICtrlCreateButton("Scanne", 512, 112, 129, 177) $Label1 = GUICtrlCreateLabel("", 512, 88, 132, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $arr=StringSplit(@IPAddress1,".") TCPStartup() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView1)) For $rra=1 to 21 $ips=$arr[1]&"."&$arr[2]&"."&$arr[3]&"."&$rra GUICtrlSetData($Label1,$ips) $aexxx=Run("ping " & $ips & " -n 1 -w " & 500, "", @SW_HIDE, $STDOUT_CHILD) $eats='' While 1 $data = StdoutRead($aexxx,0) if @error Then ExitLoop $eats&=$data WEnd If _StringBetween($eats,"= ","ms") <> "" Then $name=_TCPIpToName($ips) If $name = "" Then $name = "Unknow" EndIf _GUICtrlListView_InsertItem($ListView1, 0, "") _GUICtrlListView_AddSubItem($ListView1,0, $ips, 0) _GUICtrlListView_AddSubItem($ListView1,0,$name,1) EndIf Next EndSwitch WEnd [/HIDE-THANKS] Link to comment Share on other sites More sharing options...
Recommended Posts