#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#NoTrayIcon
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("DOS回显", 557, 283)
$Label1 = GUICtrlCreateLabel("请输入网址:", 32, 28, 76, 17)
$Input1 = GUICtrlCreateInput("", 104, 24, 376, 21)
$Button1 = GUICtrlCreateButton("开始", 496, 24, 49, 25)
$Edit1 = GUICtrlCreateEdit("", 32, 56, 513, 201)
GUICtrlSetData(-1, "")
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Input1) = "" Then
MsgBox(64,"温馨提示","网址不可为空")
Else
GUICtrlSetData($Edit1,"")
_RunDos("ping "&GUICtrlRead($Input1) &">%temp%\ip.txt")
GUICtrlSetData($Edit1,"正在努力加载,请稍后......")
Sleep(500)
GUICtrlSetData($Edit1,"")
$a=FileRead(@TempDir&"\ip.txt")
GUICtrlSetData($Edit1,$a)
EndIf
EndSwitch
WEnd
|