=sinister= Posted March 9, 2006 Share Posted March 9, 2006 (edited) Okay, been trying to figure out a way to exit a GUI when a loop is running after you've clicked a button. Heres my failing attempt - #include <GUIConstants.au3> GUICreate("GUI") $button = GUICtrlCreateButton ("OK", 10, 30, 50) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $button While 1 Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect Wend endselect Wend Sure could use some help Edited March 9, 2006 by =sinister= Link to comment Share on other sites More sharing options...
Valuater Posted March 9, 2006 Share Posted March 9, 2006 (edited) maybe #include <GUIConstants.au3> GUICreate("GUI") $button = GUICtrlCreateButton ("OK", 10, 30, 50) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $button Exit Case $msg = $GUI_EVENT_CLOSE Exit endselect Wend 8) BTW how many post do you have???? Edited March 9, 2006 by Valuater Link to comment Share on other sites More sharing options...
=sinister= Posted March 9, 2006 Author Share Posted March 9, 2006 (edited) I have 267 posts, and I mean exiting when theres a loop inside a loop. Edited March 9, 2006 by =sinister= Link to comment Share on other sites More sharing options...
Valuater Posted March 9, 2006 Share Posted March 9, 2006 I have 267 posts, and I mean exiting when theres a loop inside a loop.ok... you want to exit the program... or just the loop8) Link to comment Share on other sites More sharing options...
=sinister= Posted March 9, 2006 Author Share Posted March 9, 2006 the program. Actually, anyone would be better, I could edit it later. Link to comment Share on other sites More sharing options...
Valuater Posted March 9, 2006 Share Posted March 9, 2006 #include <GUIConstants.au3> GUICreate("GUI") $button = GUICtrlCreateButton("OK", 10, 30, 50) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $button While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd EndSelect WEnd need to "listen" for a message in the second loop 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 9, 2006 Moderators Share Posted March 9, 2006 While 1 If Condition = True Then While 1 If Condition = False Then Exit Wend EndIf WendI showed True / False because you could make it either or for the condition statement based on your needs. @Valuator - People post just to post. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
=sinister= Posted March 9, 2006 Author Share Posted March 9, 2006 nvm, I got it. You guys kid to much. Im 12 years old and very gulable. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 9, 2006 Moderators Share Posted March 9, 2006 nvm, I got it. You guys kid to much. Im 12 years old and very gulable.Geeze... I was trying to figure out the facts of life at 12... boy how times have changed! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted March 9, 2006 Share Posted March 9, 2006 Geeze... I was trying to figure out the facts of life at 12... boy how times have changed! i don't think could could have spelled "gulable" at 12 yrs.( is that right?? )( is "spelled" right??? )8) Link to comment Share on other sites More sharing options...
=sinister= Posted March 9, 2006 Author Share Posted March 9, 2006 (edited) Yes things have changed, my mom thinks im too dramatic, and all my friends are retarted and fail math 6. And your right, people do post just to post, but hey, it's not like you get an award for having alot of posts. Edited March 9, 2006 by =sinister= Link to comment Share on other sites More sharing options...
greenmachine Posted March 9, 2006 Share Posted March 9, 2006 i don't think could could have spelled "gulable" at 12 yrs.( is that right?? )( is "spelled" right??? )8)It's gullible. Link to comment Share on other sites More sharing options...
=sinister= Posted March 9, 2006 Author Share Posted March 9, 2006 Ah, what the hell, if you can read it, it's good. 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