|
有一个程序 需要根据Combobox选中的项来做分支,问题是怎么获取Combobox选中的的那项的值?
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\haifeng.wei\My Documents\au3\ipset\Form1.kxf
Opt("GUIOnEventMode", 1) ; 切换为 OnEvent 模式
$Form1 = GUICreate("XREB 会议室IP修改工具", 283, 147, 192, 114)
$Label1 = GUICtrlCreateLabel("选择会议室:", 24, 32, 67, 17)
$Combo1 = GUICtrlCreateCombo("", 96, 32, 161, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "101会议室(一楼东会议室)|105会议室(一楼西接洽室)|106会议室(一楼西会议室)|107会议室(一楼多功能室)|201会议室(二楼东会议室)|202会议室(二楼西会议室)|203会议室(二楼西北会议室)|301会议室(高管会议室)|302会议室(三楼会议室)")
$Button1 = GUICtrlCreateButton("修改IP", 40, 96, 75, 25)
$Button2 = GUICtrlCreateButton("自动获取", 168, 96, 75, 25)
GUICtrlSetOnEvent($Button1,"button1_click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(50)
WEnd
Func button1_click()
MsgBox(1,"Combobox的值是",$Combo1);这里该怎么写?
EndFunc |
|