sasruko Posted March 16, 2018 Share Posted March 16, 2018 The window is closing when i want to stop the loop. but I just want to ending to loop. not the window. i tried everything but never worked. how can i do ? HotKeySet("{ESC}","quit") While True $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 example() Case $Button2 quit() EndSwitch WEnd Func example() While running my script WEnd EndFunc Func quit this function should provide ending to loop. EndFunc Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 16, 2018 Moderators Share Posted March 16, 2018 @sasruko you cannot honestly think anyone can help you, do you? You have code that won't run, you have two functions that contain no code at all - sorry but my crystal ball is in the shop. Please post your entire code (or at least a runnable example that demonstrates the problem) and help us help you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bilgus Posted March 16, 2018 Share Posted March 16, 2018 (edited) See This: https://www.autoitscript.com/wiki/Interrupting_a_running_function Edited March 16, 2018 by Bilgus 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