What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » a GUI for this

a GUI for this
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: a GUI for this
I would have linked to the scripting documentation page, but the site seems to be down for maintenance.

quote:
Source: Scripting Documentation > Events Reference > Messenger Plus! Events > OnGetScriptMenu


The OnGetScriptMenu event is fired when some of the Messenger Plus! menus are displayed. It allows scripts to return their own menu to be added to Messenger Plus!'s one.


Syntax
Javascript code:
[string] OnGetScriptMenu(
    [enum] Location
);



Parameters

Location
[enum] A number specifying the location of the menu that triggered the event. You can use this parameter to display a different menu depending on what the current user is currently doing.  It can be one of the following values:
code:
MENULOC_CONTACTLIST (1)   Contact List
MENULOC_CHATWND (2)       Messenger Chat Window
MENULOC_MOBILEWND (3)     Mobile Device Chat Window


Return Value

An XML data string defining the script's menu. If no menu is required, return an empty string. For more information about the way to define the menu's data, see the ScriptInfo's schema documentation.


Remarks

The script's menu can be defined statically in the ScriptInfo.xml file or returned by this function is its content needs changes at runtime. If a menu is returned by this handler, it gets priority over the menu defined in ScriptInfo.xml.

If an item of the script's menu is selected by the current user, an OnEvent_MenuClicked is fired.

Messenger Plus! 4.23 and earlier: enumeration names are not available, numbers must be used instead.

Messenger Plus! 4.50 and earlier: MENULOC_MOBILEWND is not supported.


Example

Event handler generating a simple menu for the script:
Javascript code:
function OnGetScriptMenu(Location)
{
    var ScriptMenu = "<ScriptMenu>";
    ScriptMenu    +=     "<MenuEntry Id=\"MnuFeat1\">Feature 1</MenuEntry>";
    ScriptMenu    +=     "<MenuEntry Id=\"MnuFeat2\">Feature 2</MenuEntry>";
    ScriptMenu    +=     "<Separator/>";
    ScriptMenu    +=     "<MenuEntry Id=\"MnuAbout\">About...</MenuEntry>";
    ScriptMenu    += "</ScriptMenu>";
   
    return ScriptMenu;
}



This post was edited on 06-20-2010 at 10:12 AM by whiz.
06-20-2010 10:11 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
a GUI for this - by Barathrum on 06-20-2010 at 08:24 AM
RE: a GUI for this - by NanaFreak on 06-20-2010 at 08:58 AM
RE: a GUI for this - by Barathrum on 06-20-2010 at 09:11 AM
RE: a GUI for this - by whiz on 06-20-2010 at 10:11 AM
RE: a GUI for this - by Barathrum on 06-20-2010 at 12:06 PM
RE: a GUI for this - by Menthix on 06-20-2010 at 12:27 PM
RE: a GUI for this - by whiz on 06-20-2010 at 12:39 PM
RE: a GUI for this - by Barathrum on 06-20-2010 at 12:45 PM


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