Hi Vic,

    the only reason why I mentioned a flag earlier that Chip shot down was 
the possibility of a keydown and up possibly happening since the event has 
no check other than an ID check in it.
    Anything is possible and thought placing the flag would insure only one 
fire instead of 2. Knowing that each program resides in different parts of 
memory and different addressing, they should not be in conflict, should not, 
but having the same event call back is an interesting thing, especially on a 
global issue. As you say, that would be a nightmare if it were happening but 
the code is the best way for all of us to resolve it.

    Maybe something is going on with the keyboard and the vent gets fired 
twice but that to does not make sense unless the keyboard is doing it. But 
why only when global programs using the same call back, may actually do 
something but highly unlikely. But, if there is error in code and is not 
showing up that could cause this. Just like the beep error on some hotkey 
events. So anything is possible if there is some code error that is not 
caught.

        Bruce


Sent: Thursday, June 23, 2011 11:20 AM
Subject: RE: Problem creating an E-mail message through a menu


Aaron,

Can you try using my exact code that I placed in my original message in 2
apps to see if it happens for you too? If not, what could be causing this?
What might I be doing wrong?

Vic


-----Original Message-----
From: Aaron Smith [mailto:[email protected]]
Sent: Thursday, June 23, 2011 9:09 AM
To: [email protected]
Subject: Re: Problem creating an E-mail message through a menu

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