| View previous topic :: View next topic |
| Author |
Message |
Krogdor
Joined: 18 Apr 2008 Posts: 1145 Location: The Interwebs
|
Posted: Wed May 28, 2008 7:07 am Post subject: [Solved] GuiClose: for numbered GUIs |
|
|
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 |
|
 |
pokercurious
Joined: 16 Dec 2007 Posts: 47
|
Posted: Wed May 28, 2008 8:00 am Post subject: |
|
|
| 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 |
|
 |
Guest
|
Posted: Wed May 28, 2008 9:47 am Post subject: Re: GuiClose: for numbered GUIs |
|
|
| 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
|
Posted: Wed May 28, 2008 12:27 pm Post subject: |
|
|
| Code: | 2GuiClose:
; Do Whatever
3GuiClose:
; Do Whatever
4GuiClose:
; Do Whatever
5GuiClose:
; Do Whatever
; etc.. |
_________________ ScriptPad | ~dieom | dieom | izwian2k7 | Ian | God |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1145 Location: The Interwebs
|
Posted: Wed May 28, 2008 11:28 pm Post subject: |
|
|
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...
Good luck on that Gui automatic numbering, can't wait to see it finished  |
|
| Back to top |
|
 |
|