找回密码
 加入
搜索
查看: 3507|回复: 3

[AU3基础] 【求助】多网卡获取

[复制链接]
发表于 2015-1-14 21:07:52 | 显示全部楼层 |阅读模式
【求助】多网卡获取
#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
 楼主| 发表于 2015-1-14 21:08:26 | 显示全部楼层
方法太多 都看不懂。。。。
发表于 2015-1-15 08:57:15 | 显示全部楼层
学习学习。。。。。。。。。。。。。。。。。
发表于 2015-1-21 08:20:04 | 显示全部楼层
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-22 22:36 , Processed in 0.075973 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表