What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help with a menu selection

Help with a menu selection
Author: Message:
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
31 / Male / Flag
Joined: Jul 2006
O.P. Help with a menu selection
Hey, again.

For my Programming Languages Keyword Script (C/C++ Keywords is gone, it has now support for over 12 languages), I am working on the menus. So far so good, but I can't get it able to click something, and to add something to his/her send message bar.

On the click of item "PHP", I want it to add (but not send):

[ code=php] [/code ]

I tried this:

code:
var talkerList = new Array(
"PHP", "C/C++");

function OnGetScriptMenu(Location){
    var sMenu = "<ScriptMenu>";
    if(Location == 1)
    {
            sMenu += "<MenuEntry Id=\"Help\">Help - How to Use</MenuEntry>";
            sMenu += "<MenuEntry Id=\"About\">About</MenuEntry>";
    }
    else if(Location == 2)
    {
        for(var i = 0; i < talkerList.length; i++)
            sMenu += "<MenuEntry Id=\""+talkerList[i]+""+talkerList[i]+"\">"+talkerList[i]+"</MenuEntry>";
        sMenu += "<Separator/>";
        sMenu += "<MenuEntry Id=\"Help\">Help - How to Use</MenuEntry>";
        sMenu += "<MenuEntry Id=\"About\">About</MenuEntry>";
    }
    sMenu += "</ScriptMenu>";
    return sMenu;
}

function OnEvent_MenuClicked(MenuItemId,Location,OriginWnd)
{
    var currenttext = OriginWnd.EditText;
    switch(MenuItemId)
    {
            case "PHP":
                OriginWnd.EditText_SetCurSel (currenttext.substr(0,1), currenttext.substr(currenttext.length,1));
                OriginWnd.EditText_ReplaceSel ("[ code=php] [/code ]");
                break;
    }
}


It's about the PHP one. How will I get it to work?

- Jon

This post was edited on 07-09-2006 at 12:58 PM by Paril.
07-09-2006 12:57 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with a menu selection - by Paril on 07-09-2006 at 12:57 PM
RE: Help with a menu selection - by J-Thread on 07-09-2006 at 01:27 PM
RE: Help with a menu selection - by Paril on 07-09-2006 at 01:29 PM
RE: Help with a menu selection - by Paril on 07-09-2006 at 01:48 PM
RE: Help with a menu selection - by J-Thread on 07-09-2006 at 01:59 PM
RE: Help with a menu selection - by Paril on 07-09-2006 at 02:01 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