AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved] GuiClose: for numbered GUIs

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Krogdor



Joined: 18 Apr 2008
Posts: 1145
Location: The Interwebs

PostPosted: Wed May 28, 2008 7:07 am    Post subject: [Solved] GuiClose: for numbered GUIs Reply with quote

So, um. I know the GuiClose: label should work for the default GUI, but how do you make it function for one that is numbered, not the default...? I seem to remember seeing this somewhere, but I looked in the the help file where it talks about GuiClose and couldn't find anything >< I also tried making the label Gui#Close: and GuiClose#: to no avail.

Some help, por favor?

Edit: Solved, thanks guys (:


Last edited by Krogdor on Wed May 28, 2008 11:28 pm; edited 2 times in total
Back to top
View user's profile Send private message AIM Address
pokercurious



Joined: 16 Dec 2007
Posts: 47

PostPosted: Wed May 28, 2008 8:00 am    Post subject: Reply with quote

ze manual wrote:
For windows other than the first, the window's number is used as a prefix for the special labels mentioned above; for example, 2GuiEscape and 2GuiClose would be the default labels for the second window.
Back to top
View user's profile Send private message
Guest






PostPosted: Wed May 28, 2008 9:47 am    Post subject: Re: GuiClose: for numbered GUIs Reply with quote

Krogdor wrote:
...but how do you make it function for one that is numbered, not the default...?

...(just FYI pokercurious's answer is correct, but still...)...I recommend using Gui, +Label & "naming" the Gui's...even the 1st one...

Code:
Gui, +LabelMainGui
Gui, Show

Gui, 2:Default
Gui, +LabelOtherGui
Gui, Show

MainGuiClose:
return

OtherGuiClose:
return

...also if I ever finish it, I'm working on an include so the Gui numbering is automatic & you never have to know what number the Gui gets...just refer to it by name...(which would eliminate the...Gui, 2:Default...above {replacing it with something like...GuiName("OtherGui")...)...
Back to top
Trikster



Joined: 15 Jul 2007
Posts: 1224
Location: Enterprise, Alabama

PostPosted: Wed May 28, 2008 12:27 pm    Post subject: Reply with quote

Code:
2GuiClose:
; Do Whatever

3GuiClose:
; Do Whatever

4GuiClose:
; Do Whatever

5GuiClose:
; Do Whatever

; etc..

_________________
ScriptPad | ~dieom | dieom | izwian2k7 | Ian | God
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 1145
Location: The Interwebs

PostPosted: Wed May 28, 2008 11:28 pm    Post subject: Reply with quote

Thanks for the help, everyone.

Silly me, looking under the part about labels instead of the part about numbered GUIs ><

Guest wrote:
I recommend using Gui, +Label & "naming" the Gui's...even the 1st one...


Yea, I just haven't gotten around to labeling them yet... Confused
Good luck on that Gui automatic numbering, can't wait to see it finished Very Happy
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group