SpecialK Posted December 12, 2006 Posted December 12, 2006 Hello, this is my little script: #include <GUIConstants.au3> AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("WinTitleMatchMode", 4) $Parent = GUICreate("Neuer User - Leicht gemacht V. 0.1", 400, 230) $user= GUICtrlCreateInput ("Wie lautet Ihr Nutzername?", 20, 10) $weiter = GUICtrlCreateButton ("Weiter", 10, 115, 100) $Ende = GUICtrlCreateButton ("Ende", 160, 200,100) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $weiter Voelker() case $msg = $Ende ExitLoop EndSelect Wend GUISetState(@SW_HIDE) Func Voelker() Msgbox (1, "Test", $user) The Messagebox in the Function "Voelker" only gives me a "3" or something else. But not that, what i have wrote in the Input-Box in the GUI. I think i have a problem to hand over the variable $user from the GUI to the Funkction. Can anyone help me? SpecialK
BigDod Posted December 12, 2006 Posted December 12, 2006 Try #include <GUIConstants.au3> AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("WinTitleMatchMode", 4) $Parent = GUICreate("Neuer User - Leicht gemacht V. 0.1", 400, 230) $user= GUICtrlCreateInput ("Wie lautet Ihr Nutzername?", 20, 10) $weiter = GUICtrlCreateButton ("Weiter", 10, 115, 100) $Ende = GUICtrlCreateButton ("Ende", 160, 200,100) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $weiter Voelker() case $msg = $Ende ExitLoop EndSelect Wend GUISetState(@SW_HIDE) Func Voelker() Msgbox (1, "Test", GUICtrlRead($user)) EndFunc Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
SpecialK Posted December 12, 2006 Author Posted December 12, 2006 Ok, thank you. I knew it was only a little stupid problem SpecialK
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now