Jump to content

GUICtrlSetOnEvent need help


mrmimi
 Share

Recommended Posts

#include <GUIConstants.au3>

Opt("GUIOnEventMode",4)

GuiCreate("alogin", 482, 300)

GUISetOnEvent($GUI_EVENT_CLOSE, "stop")

;------BUTTONS------------------------------------

$stop = GUICtrlCreateButton("Exit", 110, 160, 70, 25)

GUICtrlSetOnEvent($stop, "stop")

$Start = GUICtrlCreateButton("Start", 10, 160, 40, 25)

GUICtrlSetOnEvent($Start, "GO")

;-------------------------------------

GUISetState()

While GuiGetMsg() <> $stop

WEnd

;---------FUNCTIONS------------------------

Func stop()

ToolTip("i wanna quit ...",470,395)

Sleep(500)

exit

EndFunc

func GO()

ToolTip("A long cycle ... Stop me pls------------------",500,300)

;-------------long cycle here.....like Sleep(9999999999) - so i need to stop it with "Exit" Button?but how ?

Sleep(100000000)

EndFunc

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...