What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] MenuButtonControl

[HELP] MenuButtonControl
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. [HELP] MenuButtonControl
Hi,

Many of you must have thought "he's been quiet for too long", well, here I am again :P (sorry :P ).

MenuButtonControls won't work, whatever I try.

Could anybody please help me?

Thanks in advance..

This post was edited on 05-18-2008 at 12:55 PM by SmokingCookie.
05-18-2008 12:55 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] MenuButtonControl
Post your XML code for the control and post the Code you were using for the script portion.

Instead of just giving you the answer we want you to atleast try (which you have) so post the code and we will tell you what you did wrong.
05-18-2008 01:21 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [HELP] MenuButtonControl
XML code:

code:
            <Control xsi:type="MenuButtonControl" Id="MnuBSave">
                <Position Left="130" Top="295" Width="50" />
                <Caption>Save</Caption>
                <Menu>
                    <MenuEntry Id="MnuSaveAll">Save all notifications</MenuEntry>
                    <MenuEntry Id="MnuSaveSelected">Save selected notifications</MenuEntry>
                </Menu>
            </Control>


JS file:

code:
function OnWndNotifsEvent_CtrlClicked(PlusWnd,ControlId) {
    if(ControlId == "MnuSaveAll") {
        Debug.Trace("> Saving all notifications");
// lots of code
    }
    if(ControlId == "MnuSaveSelected") {
        Debug.Trace("> Saving selected notifications");
// lots of code
    }
}


This post was edited on 05-18-2008 at 01:45 PM by SmokingCookie.
05-18-2008 01:39 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] MenuButtonControl
I forgot to ask, does the Window show? And when you click the control does anything appear in the debug window? From a quick glance everything looks ok but I don't have time to go line by line through it at the moment.
05-18-2008 01:45 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [HELP] MenuButtonControl
Window shows up nicely.
I click the control and the debugger reveals:
> Functieaanroep: "OnWndNotifsEvent_CtrlClicked"
("Functieaanroep" is Dutch for "function").
05-18-2008 01:48 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] MenuButtonControl
At the top of the function do Debug.Trace(ControlId); and see what is showing when you click a control.
05-18-2008 02:13 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [HELP] MenuButtonControl
First it shows MnuBSave.

Then either MnuSaveAll or MnuSaveSelected..

So it should work (I suppose)..

EDIT::

Don;t know how, but I got it to work :D

This post was edited on 05-18-2008 at 07:47 PM by SmokingCookie.
05-18-2008 02:26 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On