| View previous topic :: View next topic |
| Author |
Message |
lilljimpa
Joined: 18 Apr 2007 Posts: 127
|
Posted: Sat Dec 13, 2008 8:28 pm Post subject: [SOLVED] 6-10GuiContextMenu |
|
|
6GuiContextMenu:
7GuiContextMenu:
8GuiContextMenu:
9GuiContextMenu:
10GuiContextMenu:
code
instead of making multi row for each gui can't i make like
6-10GuiContextMenu:
code _________________ you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)...
Last edited by lilljimpa on Sun Dec 14, 2008 12:08 am; edited 1 time in total |
|
| Back to top |
|
 |
Dra_Gon
Joined: 25 May 2007 Posts: 373
|
Posted: Sat Dec 13, 2008 9:14 pm Post subject: |
|
|
Depends on the code and what is being done with those GUI's. If you have the same Context Menu for each of your GUI's then I don't see a problem with it.
Also, when you're dealing with multiple GUI's, you can use a_Gui to get the GUI number. Though I'm not sure if a Context Menu will allow that. The Docs mention a few of the instances which it will show a number, but you can try it if your Context Menu needs to be GUI-specific.
Ciao,
Dra'Gon
EDIT: OOPS! I just reread your question, didn't see that last part. That "6-10" thing probably won't respond to the context menu. But it seems to me I've seen a command which will allow for different Label names to be launched by GUI's automatically. I'll see if I can find it if someone else doesn't respond. _________________
For a good laugh {hopefully} >> megamatts.50megs.com
My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/ |
|
| Back to top |
|
 |
Dra_Gon
Joined: 25 May 2007 Posts: 373
|
Posted: Sat Dec 13, 2008 9:27 pm Post subject: |
|
|
Found it!
Unfortunately, this will affect ALL GUI event labels for the GUI's you use this for. For instance, if on those GUI's {6-10} you put:
Then your "6GuiClose:" would need to be "6-10GuiClose:" {same with the other GUI's}.
However, in a case like that you could do:
| Code: | 6-10GuiClose:
Gui, %a_Gui%:Destroy
Return |
And that should destroy only the GUI which launched the label.
Hope that helped a bit.
Ciao,
Dra'Gon
EDIT: I just noticed this is my "Year" Post {#365}. Woo-Hoo!  _________________
For a good laugh {hopefully} >> megamatts.50megs.com
My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/ |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Sat Dec 13, 2008 10:40 pm Post subject: |
|
|
Here's a short bit of working code to illustrate Dra_Gon's explanation. | Code: | Loop,4
{
Gui, %A_Index%:+Label1-4
Gui, %A_Index%:Add, Text, w400, test %A_Index%
Gui, %A_Index%:Show,% "y" 150*A_Index, %A_Index%
}
return
1-4Close:
ExitApp
1-4ContextMenu:
MsgBox, This is the context menu for Gui #%A_Gui%.
return |
|
|
| Back to top |
|
 |
lilljimpa
Joined: 18 Apr 2007 Posts: 127
|
Posted: Sun Dec 14, 2008 12:08 am Post subject: |
|
|
thank you all _________________ you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)... |
|
| Back to top |
|
 |
|