楼主的意思是把新输入的增加到下拉框吧?
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $String = "|Combo1|1|2|3|4|5|6|7|8"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Combo1 = GUICtrlCreateCombo("", 152, 80, 201, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, $String, "Combo1")
$Button1 = GUICtrlCreateButton("开始计算", 392, 72, 97, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If Not StringInStr($String, GUICtrlRead($Combo1)) Then
$String &= "|" & GUICtrlRead($Combo1)
GUICtrlSetData($Combo1, $String, GUICtrlRead($Combo1))
EndIf
EndSwitch
WEnd
|