本帖最后由 lixiaolong 于 2011-2-9 17:58 编辑
回复 1# dhh45
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 325, 330)
$Combo1 = GUICtrlCreateCombo("Combo1", 48, 16, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("OK", 160, 384, 129, 33)
GUICtrlSetData($Combo1, "aa|bb", "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Combo1
Dim $a[5]
For $i = 0 To 4
GUICtrlCreateLabel(GUICtrlRead($Combo1) & $i, 50, 100 + $i * 40, 50, 50)
$a[$i] = GUICtrlCreateInput(GUICtrlRead($Combo1) & "==>" & $i, 100, 100 + $i * 40, 50, 20)
Next
Case $Button1
For $i = 0 To 4
MsgBox(0, 0, GUICtrlRead($a[$i]))
Next;获得所有Input的值
EndSwitch
WEnd
|