#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 410, 168, 319, 214)
$Label1 = GUICtrlCreateLabel("您要PING的IP:", 24, 24, 120, 30)
$mstscip = GUICtrlCreateInput("", 136, 24, 241, 21)
$Button1 = GUICtrlCreateButton("开始", 48, 104, 113, 57, 0)
$Button2 = GUICtrlCreateButton("退出", 240, 104, 129, 57, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$ip = GUICtrlRead($mstscip)
Run(@ComSpec & " /c start ping -t " & $ip,"",0)
Case $Button2
Exit
EndSwitch
WEnd
|