ajit Posted April 29, 2009 Share Posted April 29, 2009 Hi I have a do... Until loop inside a While loop. When Do Until loop is in progress (Case $Count) the GUI is nonresponsive. Is it possible to recieve GUI messages such as $GUI_EVENT_CLOSE when Do..Until loop is in progress. Please help me. Thanking in anticipation. Ajit ;;;;;;;;;;;code;;;;;;;;;;;; $i=1 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Count Do MsgBox(0, "Value of $i is:", $i) $i = $i + 1 Until $i = 100 EndSwitch WEnd Link to comment Share on other sites More sharing options...
Valuater Posted April 29, 2009 Share Posted April 29, 2009 (edited) Maybe,,, Local $i = 1, $Looper While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Count $Looper = 1 EndSwitch If $Looper Then MsgBox(0, "Value of $i is:", $i) $i = $i + 1 If $i >= 100 Then $i = 1 $Looper = 0 EndIf EndIf WEnd ... Otherwise, you can set to OnEventMode() 8) Edited April 29, 2009 by Valuater Link to comment Share on other sites More sharing options...
zorphnog Posted April 29, 2009 Share Posted April 29, 2009 Not sure exactly what you are trying to accomplish here, but you would still need to be receiving gui messages in order to catch a close event. Of course doing it this way you will lose any messages other than $GUI_EVENT_CLOSE that might be sent. If you post your full code, we may be able to suggest a better way to accomplish this. $i=1 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Count Do If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit MsgBox(0, "Value of $i is:", $i) $i = $i + 1 Until $i = 100 EndSwitch WEnd Link to comment Share on other sites More sharing options...
ajit Posted April 29, 2009 Author Share Posted April 29, 2009 @Valuator Thanks very much for the reply. I am trying it out. Regards Ajit Link to comment Share on other sites More sharing options...
ajit Posted April 29, 2009 Author Share Posted April 29, 2009 @zorphnog Thanks for the reply. Did not post the code as it was a complete mess. Will post it as soon as i clean it. Thanks again. Regards Ajit 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