What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [I maid the change, in my CASE section]???

[I maid the change, in my CASE section]???
Author: Message:
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
50 / Male / –
Joined: Feb 2007
O.P. Dodgy  [I maid the change, in my CASE section]???
Ok, I tranlate in english my entire script, for Melin talk in englis whit more choce. I add all channel TrueVoice.

My problem is : the status never change when I click on my menu. Do you have a idea?^o)


In registry write ok, but read I don't know.(Y)
My bug is In case section, unly defaut section work and case 1 at 10 dont work.:o

code:
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd) {
        switch(MenuItemId) {
            case "MerlinState":
            new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"EnabledStatus", (Enabled = !Enabled), "REG_DWORD");
            OnEvent_Initialize(false);
            break;
            case "Woman_CH1":
            new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 1);
            Change_voice();
            break;
            case "Woman_CH2":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 2);
                 Change_voice();
                 break;
                 case "Man_CH1":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 3);
                 Change_voice();
                 break;
            case "Man_CH2":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 4);
                 Change_voice();
                 break;
            case "Man_CH3":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 5);
                 Change_voice();
                 break;
            case "Man_CH4":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 6);
                 Change_voice();
                 break;
            case "Man_CH5":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 7);
                 Change_voice();
                 break;
            case "Man_CH6":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 8);
                 Change_voice();
                 break;
            case "Man_CH7":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 9);
                 Change_voice();
                 break;
            case "Man_CH8":
                 new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 10);
                 Change_voice();
                 break;
                 //default:
                 //new ActiveXObject("WScript.Shell").RegWrite(MsgPlus.ScriptRegPath+"CHANNEL", 3);
                 //Change_voice();
                 //break;
                 //case "Refresh":
                 //Change_voice()
                 //break;
    }
}

function OnGetScriptMenu(Location){
   
    ScriptMenu = "<ScriptMenu>";   
    ScriptMenu += "    <MenuEntry Id=\"Status\" Enabled=\"False\">"+State+"</MenuEntry>";   
    ScriptMenu += "    <Separator/>";
    ScriptMenu += "    <MenuEntry Id=\"SVoice\" Enabled=\"False\">"+VOICE+"</MenuEntry>";
    ScriptMenu += "    <Separator/>";   
    ScriptMenu += "    <MenuEntry Id=\"MerlinState\">" + (Enabled ? "[ OFF ]" : "[ ON ]") + "</MenuEntry>";
    ScriptMenu += "    <Separator/>";
    ScriptMenu += "   <SubMenu Label=\"woman\">";
    ScriptMenu += "        <MenuEntry Id=\"Woman_CH1\" > Woman channel #1 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Woman_CH2\" > Woman channel #2 </MenuEntry>";
    ScriptMenu += "    </SubMenu>";
    ScriptMenu += "    <Separator/>";
    ScriptMenu += "   <SubMenu Label=\"Man\">";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH1\" > Man channel #1 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH2\" > Man channel #2 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH3\" > Man channel #3 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH4\" > Man channel #4 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH5\" > Man channel #5 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH6\" > Man channel #6 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH7\" > Man channel #7 </MenuEntry>";
    ScriptMenu += "        <MenuEntry Id=\"Man_CH8\" > Man channel #8 </MenuEntry>";
    ScriptMenu += "    </SubMenu>";
    ScriptMenu += "    <Separator/>";
    ScriptMenu += "    <MenuEntry Id=\"Refresh\" > Refresh all </MenuEntry>";
    ScriptMenu += "    <Separator/>";
    ScriptMenu += "    <MenuEntry Id=\"Author\" Enabled=\"False\">Maid by XSylvain2</MenuEntry>";
    ScriptMenu += "</ScriptMenu>";
    return ScriptMenu;
}

function Change_voice(){
    if(Merlin){
      try{
          CHANNEL = new ActiveXObject("WScript.Shell").RegRead(MsgPlus.ScriptRegPath+"CHANNEL");
      } catch (err){
          CHANNEL = false;
      }
      switch(CHANNEL) {
          case 1:   
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273008}");
            VOICE = "Woman channel #1";
            break;
        case 2:                   
                Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273009}");
                VOICE = "Woman channel #2";
                break;
            case 3:         
                Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273000}");
                VOICE = "Man channel #1";
                break;
            case 4:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273001}");
            VOICE = "Man channel #2";
            break;
        case 5:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273002}");
            VOICE = "Man channel #3";
            break;
        case 6:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273003}");
            VOICE = "Man channel #4";
            break;
        case 7:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273004}");
            VOICE = "Man channel #5";
            break;
        case 8:   
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273005}");
            VOICE = "Man channel #6";
            break;
        case 9:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273006}");
            VOICE = "Man channel #7";
            break;
        case 10:
             Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273007}");
             VOICE = "Man channel #8";
             break;
        default:
            Merlin.TTSModeID = ("{CA141FD0-AC7F-11D1-97A3-006008273000}");
                VOICE = "Man channel #1";
         }
            Debug.Trace("CHANNEL = "+CHANNEL);
            Debug.Trace("VOICE = "+VOICE);                                                               
    }
}

This post was edited on 03-17-2007 at 09:15 PM by xsylvain2.
03-17-2007 02:05 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[I maid the change, in my CASE section]??? - by xsylvain2 on 03-17-2007 at 02:05 PM
RE: A litle bug, I'm confused - by Matti on 03-17-2007 at 02:27 PM
RE: A litle bug, I'm confused - by xsylvain2 on 03-17-2007 at 03:08 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