zamboni128 Posted January 9, 2011 Share Posted January 9, 2011 I've been trying different things and researching how to tell when the user press the OK button in the attached script. Can someone help please. Thanks in AdvanceListbox.au3 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 9, 2011 Share Posted January 9, 2011 Think about this part: Local $hGUI, $sMsg And: Switch $sMsg Case $Button_Ok Exit EndSwitch What is $sMsg? Nothing. Do you really want to Switch nothing? Don't you want it to actually do something? Either you made a mistake, or you have no idea what you're doing. Read "GUI Reference" in the helpfile if you are unsure. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
4Eyes Posted January 9, 2011 Share Posted January 9, 2011 (edited) zmboni128, If you change this: ; Loop until user exits Do Switch $sMsg Case $Button_Ok Exit EndSwitch Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>_Main to this: ; Loop until user exits While 1 $sMsg = GUIGetMsg() Switch $sMsg Case $Button_Ok Exit Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd it'll work. 4Eyes Edited January 9, 2011 by 4Eyes Link to comment Share on other sites More sharing options...
zamboni128 Posted January 9, 2011 Author Share Posted January 9, 2011 Thank you for your help. 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