[AutoIt] Hilfe! GUICtrlRead Combobox = 0 ??

02/15/2011 17:40 guapopaul#1
Hallo!

Ich habe ein kleines Problem mit meiner Combobox. Immer wenn ich mithilfe der Funktion show() den Wert der Combobox auslesen möchte, ist das Ergebnis eine 0. Hab schon lange gegoogelt aber nichts gefunden was mich weiterbringt. Kann mir bitte eine sagen woran es liegen kann? Thx garantie :P

Unten ist ein Beispiel, wollte keinen Kilometerlangen Code reinkopieren.


gruß Trooper
02/15/2011 17:58 GuestxD#2
PHP Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"297140193115)
$Combo GUICtrlCreateCombo("Startwert"402420125)
GUICtrlSetData(-1,"100|test|9000")
$Button GUICtrlCreateButton("show"4088203250)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button
            show
()
    EndSwitch
WEnd

Func show
()
    
$ergebnis GUICtrlRead($Combo)
    
msgbox (0"test"$ergebnis)
EndFunc 

$Combo = GUICtrlCreateCombo("Startwert", 40, 24, 201, 25)
$Combo = GUICtrlSetData(-1,"100|test|9000")

$Combo = GUICtrlCreateCombo("Startwert", 40, 24, 201, 25)
GUICtrlSetData(-1,"100|test|9000")