I created two test scripts which pop up a message box when their respective menu items are selected. They both have the exact same menu structure in the XML, and they're both using the same menu ids. When I load both as global, and execute the menu item for the first one, I get only its message box. When I execute the menu item for the second one, I get only its message box. So, with a simple test, I'm not able to duplicate any issue of the scripts sharing menu space.

Aaron

On 6/22/2011 8:49 PM, Vic Beckley wrote:
As a second addendum, I now changed my MenuItem ID to be different in 1 of
the conflicting apps and the problem went away. It appears to only affect
global apps because I have a program-specific app with the same E-mail Me
option and when I had it running along with the 2 global apps I only got 2
messages, not 3. Is this to be expected or is this a bug?

-----Original Message-----
From: Vic Beckley [mailto:[email protected]]
Sent: Wednesday, June 22, 2011 8:35 PM
To: GW Scripting List
Subject: Problem creating an E-mail message through a menu

As an addendum to this message, I disabled 1 of my global apps with this
menu choice and only got 1 new message. Why would this be happening?
Shouldn't WE only execute the code for the app who owns the menu choice that
was selected? Is there any way to work around this? If menu items that are
the same are executed even though they are for different apps, this could
get very messy if 2 app authors accidentally came up with the same menu
items.

-----Original Message-----
From: Vic Beckley [mailto:[email protected]]
Sent: Wednesday, June 22, 2011 8:02 PM
To: GW Scripting List ([email protected])
Subject: Problem creating an E-mail message through a menu

Hi all,

I need some help with a problem. I am adding a menu choice to my app's menus
to send me an E-mail. I now have 2 global apps with the identical menu code
and vbs code to accomplish this. When I choose the E-mail Me option on the
app's menu, I get 2 E-mail messages coming up addressed to me, instead of
just 1 as I would expect. Here is the code I am using.

XML file:
                <menu id="my_script_menu">Version Check
                <menuitem id="menu_hkm" enabled="yes"
shortcut="k"><![CDATA[Change Hot Key]]></menuitem><menuitem id="menu_update"
shortcut="u"><![CDATA[Check for Update]]></menuitem><menuitem
id="menu_email" shortcut="e"><![CDATA[E-mail Me]]></menuitem><menuitem
id="menu_help" shortcut="h"><![CDATA[Help]]></menuitem></menu>

VBS file:
Dim myMenu : Set myMenu = Menu(myXMLFile, "my_script_menu", "MenuProc")

Function MenuProc(menuObj, id)
        MenuProc = False
        Select Case id
                Case "menu_help"
                        If Not SO_StandardHelpDialog Is Nothing Then
                                Queue "ScriptHelp"
                        End If
                        MenuProc = True
                        Exit Function
Case "menu_hkm"
Queue "RunHotkeyManager"
MenuProc = True
Exit Function
             Case "menu_update"
             Queue "ManualCheckForUpdates"
             MyMenuProc = True
             Exit Function
                Case "menu_email"
        
SharedObjects("com.GWMicro.GWToolkit.LaunchUrl")("MailTo://"&
myStrings("EmailAddress"))
                        MenuProc = True
                        Exit Function
        End Select
End Function

Any idea why I would get 2 messages? I have 2 global apps using the exact
same XML and VBS structure. Could WE be running the code twice because of
that?

Also, does anyone know of a way that I can fill in the Subject field of the
new message along with the To field?

Vic



--
Aaron Smith
Web Development * App Development * Product Support Specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Reply via email to