|
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate(" David专用工具(限科大科技园专用)", 633, 448, 192, 124)
$MenuItem4 = GUICtrlCreateMenu("Tools")
$MenuItem11 = GUICtrlCreateMenuItem("我的电脑", $MenuItem4)
$MenuItem12 = GUICtrlCreateMenuItem("控制面板", $MenuItem4)
$MenuItem10 = GUICtrlCreateMenuItem("检查网关", $MenuItem4)
$MenuItem9 = GUICtrlCreateMenuItem("检查外网", $MenuItem4)
$MenuItem8 = GUICtrlCreateMenuItem("显示本机IP", $MenuItem4)
$MenuItem3 = GUICtrlCreateMenu("Swith")
$MenuItem6 = GUICtrlCreateMenuItem("检查线路", $MenuItem3)
$MenuItem7 = GUICtrlCreateMenuItem("查看MAC", $MenuItem3)
$MenuItem13 = GUICtrlCreateMenuItem("清除MAC", $MenuItem3)
$MenuItem2 = GUICtrlCreateMenu("Router")
$MenuItem14 = GUICtrlCreateMenuItem("检查线路", $MenuItem2)
$MenuItem15 = GUICtrlCreateMenuItem("连接路由", $MenuItem2)
$MenuItem16 = GUICtrlCreateMenu("Quit")
$MenuItem1 = GUICtrlCreateMenu("Help")
$MenuItem5 = GUICtrlCreateMenuItem("About", $MenuItem1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $MenuItem4
Run(@ComSpec & " /c " & 'ping 10.1.40.1', "", @SW_MAXIMIZE );打开ping
case $MenuItem9
case $MenuItem4
;检查外网
$var = Ping("www.baidu.com",250)
If $var Then; also possible: If @error = 0 Then ...
Msgbox(64,"Status","Online, roundtrip was:" & $var)
Else
Msgbox(64,"Status","An error occured with number: " & @error)
EndIf
EndSwitch
WEnd |
|