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
