【求助】多网卡获取
【求助】多网卡获取#include <ButtonConstants.au3>#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
Global Const $gc_FormName = "IP设置程序"
#Region
Global $gu_Form1 = GUICreate($gc_FormName, 337, 450, -1, -1)
Global $gu_Group0 = GUICtrlCreateGroup("选择网卡", 8, 8, 321, 57)
Global $gu_Combo0 = GUICtrlCreateCombo("", 72, 32, 249, 25)
Global $gu_Label0 = GUICtrlCreateLabel("网卡选择", 16, 34, 52, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $gu_Group1 = GUICtrlCreateGroup("IP设置方案", 8, 72, 321, 57)
Global $gu_Combo1 = GUICtrlCreateCombo("", 72, 96, 249, 25)
Global $gu_Label7 = GUICtrlCreateLabel("选择方案", 16, 98, 52, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $gu_Group2 = GUICtrlCreateGroup("网络设置", 8, 142, 321, 255)
Global $gu_Label0 = GUICtrlCreateLabel("计算机名", 16, 172, 52, 17)
Global $gu_Label1 = GUICtrlCreateLabel("IP地址", 16, 204, 52, 17)
Global $gu_Label2 = GUICtrlCreateLabel("子网掩码", 16, 236, 52, 17)
Global $gu_Label3 = GUICtrlCreateLabel("默认网关", 16, 268, 52, 17)
Global $gu_Label4 = GUICtrlCreateLabel("首选DNS", 16, 300, 52, 17)
Global $gu_Label5 = GUICtrlCreateLabel("备用DNS", 16, 332, 52, 17)
Global $gu_Label6 = GUICtrlCreateLabel("MAC地址", 16, 364, 52, 17)
Global $gu_Input0 = GUICtrlCreateInput(@ComputerName, 72, 170, 249, 21)
Global $gu_Input1 = GUICtrlCreateInput(@IPAddress1, 72, 202, 249, 21)
Global $gu_Input2 = GUICtrlCreateInput("255.255.255.0", 72, 234, 249, 21)
Global $gu_Input3 = GUICtrlCreateInput("192.168.0.3", 72, 266, 249, 21)
Global $gu_Input4 = GUICtrlCreateInput("202.96.128.86", 72, 298, 249, 21)
Global $gu_Input5 = GUICtrlCreateInput("202.96.128.166", 72, 330, 249, 21)
Global $gu_Input6 = GUICtrlCreateInput("", 72, 362, 249, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $gu_Button1 = GUICtrlCreateButton("关于", 8, 410, 57, 25)
Global $gu_Button2 = GUICtrlCreateButton("执行", 200, 410, 65, 25)
Global $gu_Button3 = GUICtrlCreateButton("退出", 272, 410, 57, 25)
#EndRegion
_Main()
Exit
Func _Main()
GUICtrlSetData($gu_Combo0, "网卡1|网卡2|网卡3", "网卡1")
GUICtrlSetData($gu_Combo1, "方案1|方案2|方案3", "方案1")
GUISetState(@SW_SHOW)
Local $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gu_Combo0
Local $Set = GUICtrlRead($gu_Combo0)
MsgBox(0 + 64, $gc_FormName, "程序测试中!", 0, $gu_Form1)
EndSwitch
WEnd
EndFunc ;==>_Main 方法太多 都看不懂。。。。 学习学习。。。。。。。。。。。。。。。。。 http://www.autoitx.com/thread-46245-1-1.html
页:
[1]