#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
$Form1 = GUICreate("Form1", 170, 42, 204, 174)
$Button1 = GUICtrlCreateButton("Button1", 8, 8, 73, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 88, 8, 73, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_RunDos('netsh interface set interface "LAN1" DISABLE')
_RunDos('netsh interface set interface "LAN2" ENABLE')
Case $Button2
_RunDos('netsh interface set interface "LAN1" ENABLE')
_RunDos('netsh interface set interface "LAN2" DISABLE')
EndSwitch
WEnd
是这样吗?
[ 本帖最后由 78391493 于 2008-9-22 21:30 编辑 ] |