Jump to content

Window is closing when i trying to stop the loop.


Recommended Posts

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

  • Moderators

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...