Shoutbox

Scriptmenu - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Scriptmenu (/showthread.php?tid=71208)

Scriptmenu by Jumpfreakske on 01-30-2007 at 07:48 PM

On Today at 20:26, Jumpfreakske wrote:
Whats the name and code for something lower
then a submenu

that thing is something like this:
ScriptMenu += "<MenuEntry Id=\"MnuArtiesten\">Artiesten</MenuEntry>";

But now I need a menu lower then this Menu Entry
do you understand?

Menu > Submenu > Menu Entry >  '?'



(I Want: when you click/mouse over on Albums > then there must show up another submenu on that) does anyone know the code?

[Image: My_Screenshot_96.png]


RE: Scriptmenu by Jimbo on 01-30-2007 at 07:57 PM

Example taken from activity launcher created by alexp2_ad

code:
function OnGetScriptMenu(nLocation){
    var ScriptMenu = "<ScriptMenu>\n";
    var submenus = new Array();
    for(i=0;i<Activities.length;i++){
        var found = false;
        for(j=0;j<submenus.length;j++){
            if(submenus[j][0] == Activities[i][3]){ submenus[j][submenus[j].length] = Activities[i]; found = true; }
        }
        if(!found){
            var temp = submenus.length;
            submenus[temp] = new Array();
            submenus[temp][0] = Activities[i][3];
            submenus[temp][1] = Activities[i];
        }
    }
    for(i=0;i<submenus.length;i++){
        ScriptMenu+="\t<SubMenu Label=\""+submenus[i][0]+"\">";
        for(j=1;j<submenus[i].length;j++){
            if(submenus[i][j][2]){
                ScriptMenu+="\t\t<MenuEntry Id=\"Activity-"+submenus[i][j][1]+"\">"+MakeXmlFriendly(submenus[i][j][0])+"</MenuEntry>\n";
            }
        }
        ScriptMenu+="\t</SubMenu>";
    }
    ScriptMenu+="\t<Separator/>\n";
    ScriptMenu+="\t<MenuEntry Id=\"Configure\">Configure</MenuEntry>\n";
    ScriptMenu+="\t<MenuEntry Id=\"Default\">Restore Default Activity List</MenuEntry>\n";
    ScriptMenu+="\t<MenuEntry Id=\"About\">About This Script</MenuEntry>\n";
    ScriptMenu+= "</ScriptMenu>";
    return ScriptMenu;
}


RE: Scriptmenu by Jesus on 01-30-2007 at 07:59 PM

http://shoutbox.menthix.net/showthread.php?tid=69...d=759563#pid759563

the search function of this forum is not only there because it looks cool :/

edit: it's in the docs too...


RE: Scriptmenu by Jumpfreakske on 01-30-2007 at 08:07 PM

Yes, that's it, but now I want to create another submenu under that: look here what I mean:


<ScriptMenu>
  <MenuEntry Id="foo">Normal menu entry</MenuEntry>
  <SubMenu Label="SubMenu name here">
    <MenuEntry Id="bar">SubMenu entry</MenuEntry>
        """Under here another sub-submenu"""  </SubMenu>
</ScriptMenu>


My Script > Jumpstyle > Albums   > Defqon1 2006
                                      Artiesten
                                      Liedjes
                  Hardstyle >  Albums
                                      artiesten
                                      Liedjes

So then I have 4 kinds of menu: Headmenu > Submenu > sub-submenu > sub-sub-submenu!  but I need the code for those menu's


RE: Scriptmenu by Jumpfreakske on 01-30-2007 at 08:11 PM

My code that I Have:

function OnGetScriptCommands(){
    var commands = '<ScriptCommands>';
        commands+='<Command>';
            commands+='<Name>Hardstyle</Name>';
        commands+='</Command>';
        commands+='<Command>';
            commands+='<Name>Jumpstyle</Name>';
        commands+='</Command>';
        commands+='<Command>';
            commands+='<Name>Extra</Name>';
        commands+='</Command>';
        commands+='</ScriptCommands>';
    return commands;
}


function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd) {
if (Location == 2) {
if (MenuItemId == "MnuAlbums2") OriginWnd.SendMessage("ALBUMS2");
if (MenuItemId == "MnuLiedjes2") OriginWnd.SendMessage("LIEDJES2");
if (MenuItemId == "MnuArtiesten2") OriginWnd.SendMessage("ARTIESTEN2");
if (MenuItemId == "MnuAlbums") OriginWnd.SendMessage("ALBUMS");
if (MenuItemId == "MnuLiedjes") OriginWnd.SendMessage("LIEDJES");
if (MenuItemId == "MnuArtiesten") OriginWnd.SendMessage("ARTIESTEN");
if (MenuItemId == "MnuStijlen") OriginWnd.SendMessage("!Stijlen");
if (MenuItemId == "MnuArtiesten Jumpstyle") OriginWnd.SendMessage("!Artiesten Jumpstyle");
if (MenuItemId == "MnuLocaties Jumpstyle") OriginWnd.SendMessage("!Locaties Jumpstyle");
if (MenuItemId == "MnuEvenementen Jumpstyle") OriginWnd.SendMessage("!Evenementen Jumpstyle");
if (MenuItemId == "MnuHoe Jumpen?") OriginWnd.SendMessage("!Hoe Jumpen?");
}
}


function OnGetScriptMenu(Location) {
if (Location == 2) { // Script menu in chat window
var ScriptMenu = "<ScriptMenu>";
ScriptMenu += "<SubMenu Label=\"Hardstyle\">";
ScriptMenu += "<MenuEntry Id=\"MnuAlbums2\">Albums</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuLiedjes2\">Liedjes</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuArtiesten2\">Artiesten</MenuEntry>";
ScriptMenu += "</SubMenu>";
ScriptMenu += "<SubMenu Label=\"Jumpstyle\">";
ScriptMenu += "<MenuEntry Id=\"MnuAlbums\">Albums</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuLiedjes\">Liedjes</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuArtiesten\">Artiesten</MenuEntry>";
ScriptMenu += "</SubMenu>";
ScriptMenu += "<SubMenu Label=\"Extra\">";
ScriptMenu += "<MenuEntry Id=\"MnuStijlen\">Stijlen</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuArtiesten Jumpstyle\">Artiesten Jumpstyle</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuLocaties Jumpstyle\">Locaties Jumpstyle</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuEvenementen Jumpstyle\">Evenementen Jumpstyle</MenuEntry>";
ScriptMenu += "<MenuEntry Id=\"MnuHoe Jumpen?\">Hoe Jumpen?</MenuEntry>";
ScriptMenu += "</SubMenu>";
ScriptMenu += "</ScriptMenu>";
return ScriptMenu;
}
}