zamboni128 0 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 Share this post Link to post Share on other sites
AdmiralAlkex 126 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 Share this post Link to post Share on other sites
4Eyes 10 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 Share this post Link to post Share on other sites
zamboni128 0 Posted January 9, 2011 Thank you for your help. Share this post Link to post Share on other sites