kmumm111 Posted July 31, 2012 Share Posted July 31, 2012 I have been banging my head againist the wall for a hour trying to figure this out. Can someone please explain why this does not work and the final message box doesn't appear? Thanks #include <GUIConstantsEx.au3> Dim $store $hGUI = GUICreate("Test", 500, 500) $hCombo = GUICtrlCreateCombo("Item 1", 10, 10, 100, 20) GUICtrlSetData(-1, "Item 2|Item 3") $hButton = GUICtrlCreateButton("Read", 10, 50, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton $store = GUICtrlRead($hCombo) Exit EndSwitch WEnd MsgBox(0, "test", $store) Link to comment Share on other sites More sharing options...
bogQ Posted July 31, 2012 Share Posted July 31, 2012 (edited) change every Exit to ExitLoop cos Exit is to exit apporadd msgbox before every exitas for combobox to declare you can try Assign() or you mistuped in yout post title and you mented to say to "Use a combobox to set a variable" and i misunderstud you Edited July 31, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
kmumm111 Posted August 1, 2012 Author Share Posted August 1, 2012 change every Exit to ExitLoop cos Exit is to exit apporadd msgbox before every exitas for combobox to declare you can try Assign() or you mistuped in yout post title and you mented to say to "Use a combobox to set a variable" and i misunderstud youDoh! Thanks I totally did not understand the difference between End and Endloop Link to comment Share on other sites More sharing options...
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