Sign in to follow this  
Followers 0
mrmimi

GUICtrlSetOnEvent need help

2 posts in this topic

#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

Share this post


Link to post
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
Sign in to follow this  
Followers 0