Huhu AutoIT !
Ich hab da wieder ein kleines Problem !
Sieht euch einfach das Beispielscript an!
Ziel: MsgBox mit der Nachricht was bei der Combobox ausgewählt wurde! also z.b. Test 2 wenn Test 2 ausgewählt wurde..
Aber wenn ich bei den ??? $read einfüge sollte es doch eigentlich funktionieren, oder?
Spoiler anzeigen
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)GUICreate("combotest", 200, 200)$map = GUICtrlCreateCombo("", 5, 5)GUICtrlSetData($Map, "|Test 1|Test 2|Test 3")GUICtrlSetOnEvent($map, "_comboread")$Button1 = GUICtrlCreateButton("Button1", 96, 120, 75, 25)
GUISetState()While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitCase $Button1 MsgBox(0,"test",$??????) EndSwitchWEnd
Func _comboread() $read = GUICtrlRead($map) If $read = "Test 1" Then MsgBox(0,"test","Test 1") If $read = "Test 2" Then MsgBox(0,"test","Test 2") If $read = "Test 3" Then MsgBox(0,"test","Test 3") EndFunc
Danke schonmal im Vorraus!