i tryed to see with a msgbox, what is in the combobox selected. but unfortunately there every time arrives "box1". what shall i change that the other ones come, like item1, item2....
#include <GUIConstants.au3>
Global $selected
GUICreate("TEST1", 400, 400)
GUISetState(@SW_SHOW)
Opt('GUIOnEventMode', 1)
hotkeyset("{ESC}", "terminate")
HotKeySet("{f7}", "GO")
hotkeyset("{f8}", "selectiontest")
$combo1 = GUICtrlCreateCombo("box1", 50, 50, 200, 100, 3) ; create combo box
GUICtrlSetData($combo1,"item1||item2|item3|item4|item5" ) ; Set data in Combo Box1
$selected = GuiCtrlRead($combo1)
func GO()
if $selected = "box1" Then
MsgBox(1, " Selection", "box1")
EndIf
if $selected = "item1" Then
msgbox(1, "Selection", "item1")
EndIf
if $selected = "item2" Then
msgbox(1, "Selection", "item2")
EndIf
if $selected = "item33" then
msgbox(1,"selection","item3")
EndIf
if $selected = "item4" then
msgbox(1,"selection","item4")
EndIf
if $selected = "item5" Then
msgbox(1,"selection", "item5")
EndIf
EndFunc
func selectiontest() ;; $selected = ??
MsgBox(1,"What is selected???", $selected )
EndFunc
while 1 ;idle
sleep(250)
WEnd
func terminate() ;exit
Exit 0
EndFunc