#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
Local $var $var1
#Region ### START Koda GUI section ### Form=c:\documents and settings\administrator\桌面\form1.kxf
$Form1_1 = GUICreate("Form1", 418, 412, 357, 158)
$Tab1 = GUICtrlCreateTab(0, 0, 417, 361)
$TabSheet1 = GUICtrlCreateTabItem("计划任务")
$Checkbox1 = GUICtrlCreateCheckbox("开机启动程序", 32, 56, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("记录运行日志", 32, 88, 105, 17)
$Checkbox3 = GUICtrlCreateCheckbox("断电自动关机", 32, 120, 97, 17)
$Checkbox4 = GUICtrlCreateCheckbox("定期重启服务器", 32, 200, 113, 17)
$Radio1 = GUICtrlCreateRadio("指定", 32, 240, 49, 17)
$Radio2 = GUICtrlCreateRadio("每周", 32, 272, 49, 17)
$Radio3 = GUICtrlCreateRadio("每月", 32, 304, 57, 17)
$Group2 = GUICtrlCreateGroup("计划任务", 16, 176, 385, 161)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Combo1 = GUICtrlCreateCombo("Combo1", 104, 240, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo2 = GUICtrlCreateCombo("Combo2", 184, 240, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo3 = GUICtrlCreateCombo("Combo3", 272, 240, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo4 = GUICtrlCreateCombo("Combo4", 104, 272, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo5 = GUICtrlCreateCombo("Combo5", 184, 272, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo6 = GUICtrlCreateCombo("Combo6", 272, 272, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo7 = GUICtrlCreateCombo("Combo7", 104, 304, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo8 = GUICtrlCreateCombo("Combo8", 184, 304, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Combo9 = GUICtrlCreateCombo("Combo9", 272, 304, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$TabSheet2 = GUICtrlCreateTabItem("监控中心")
GUICtrlSetState(-1,$GUI_SHOW)
$Label11= GUICtrlCreateLabel ( "", 72, 272 , 40 , 17 )
$Label12= GUICtrlCreateLabel ( "", 72, 232 , 40 , 17 )
$Label1 = GUICtrlCreateLabel("名称:", 24, 72, 40, 17)
$Label2 = GUICtrlCreateLabel("系统:", 24, 104, 40, 17)
$Label3 = GUICtrlCreateLabel("I P:", 24, 136, 38, 17)
$Label4 = GUICtrlCreateLabel("内网:", 24, 232, 40, 17)
$Label5 = GUICtrlCreateLabel("外网:", 24, 272, 40, 17)
$Group3 = GUICtrlCreateGroup("本机信息", 16, 48, 385, 129)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("网络信息", 16, 208, 385, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("维护工具")
$Button3 = GUICtrlCreateButton("Button3", 34, 55, 90, 30)
$Button4 = GUICtrlCreateButton("Button4", 164, 55, 90, 30)
$Button5 = GUICtrlCreateButton("Button5", 294, 55, 90, 30)
$Button6 = GUICtrlCreateButton("Button6", 34, 115, 90, 30)
$Button7 = GUICtrlCreateButton("Button7", 164, 115, 90, 30)
$Button8 = GUICtrlCreateButton("Button8", 294, 115, 90, 30)
$Button9 = GUICtrlCreateButton("Button9", 34, 175, 90, 30)
$Button10 = GUICtrlCreateButton("Button10", 164, 175, 90, 30)
$Button11 = GUICtrlCreateButton("Button11", 294, 175, 90, 30)
$Button12 = GUICtrlCreateButton("Button12", 34, 235, 90, 30)
$Button13 = GUICtrlCreateButton("Button13", 164, 235, 90, 30)
$Button14 = GUICtrlCreateButton("Button14", 294, 235, 90, 30)
$Button15 = GUICtrlCreateButton("Button15", 34, 295, 90, 30)
$Button16 = GUICtrlCreateButton("Button16", 164, 295, 90, 30)
$Button17 = GUICtrlCreateButton("Button17", 294, 295, 90, 30)
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("隐藏程序", 165, 368, 90, 30)
$Button2 = GUICtrlCreateButton("退出程序", 295, 368, 90, 30)
$Label6 = GUICtrlCreateLabel("本程序只支持易游服务器", 8, 376, 136, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibRegister("LAN",1000)
AdlibRegister("WAN",1000)
While 1
Sleep ( 1000 )
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
AdlibUnRegister ( "LAN" )
AdlibUnRegister ( "WAN" )
Exit
Case $Button2
AdlibUnRegister ( "LAN" )
AdlibUnRegister ( "WAN" )
Exit
EndSwitch
WEnd
Func LAN()
$var = Ping("192.168.1.1", 250)
If $var Then
GUICtrlSetData($Label12,$var&"ms")
Else
If @error = 1 Then
MsgBox(4096, "", "192.168.1.1丢包")
ElseIf @error = 2 Then
MsgBox(4096, "", "网卡被拔出")
EndIf
EndIf
EndFunc
Func WAN()
$var1 = Ping("202.96.64.68", 250)
If $var1 Then
GUICtrlSetData($Label11,$var&"ms")
Else
If @error = 1 Then
MsgBox(4096, "", "202.96.64.68丢包")
ElseIf @error = 2 Then
MsgBox(4096, "", "网卡被拔出")
EndIf
EndIf
EndFunc
脚本不算完整 我暂时只到这就写不下去了