What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Disable/Enable.

[Request] Disable/Enable.
Author: Message:
Seed
New Member
*


Posts: 3
Joined: Apr 2010
O.P. RE: [Request] Disable/Enable.
Nice Whiz it's what i want but i got some problem.

Look my code :

code:
var Enabled = 0;

function OnGetScriptMenu()
{
    var Menu = "<ScriptMenu>";
    if(Enabled==0) { Menu += "   <MenuEntry Id=\"ToggleEnable\">Enable</MenuEntry>"; }
    if(Enabled==1) { Menu += "   <MenuEntry Id=\"ToggleEnable\">Disable</MenuEntry>"; }
    return Menu + "</ScriptMenu>";
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
    switch (MenuItemId)
    {
        case "ToggleEnable":
            if(Enabled == 1) { Enabled = 0; }
            if(Enabled == 0) { Enabled = 1; }
            break;
        // add additional menu items here...
    }
}

And after :

code:
if(Enabled==1)
{
[...]My Code[...]
}
else
{
function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
if(Message=="!is_activated"){

return "Result is : " + Enabled;
}
}
}

But my code does not work.. (After the if), when i do !is_activated, answer is 1 (Enabled). But after, don't work.

A part of my code :

code:
if(Enabled==1)
{
function SendMessage(sMessage)
{
return sMessage;
}

function OnEvent_ChatWndSendMessage(ChatWnd,Message){

if(Message=="Email"){
return 'blabla';
}

When i type "Email", return is.. "Email". 8-|

Do you know why ?

Thanx,
Best regards !

EDIT : The menu works, it's just my code, i think it's the "if". :/

This post was edited on 04-09-2010 at 08:52 PM by Seed.
04-09-2010 08:51 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Disable/Enable. - by Seed on 04-09-2010 at 07:54 PM
RE: [Request] Disable/Enable. - by whiz on 04-09-2010 at 08:15 PM
RE: [Request] Disable/Enable. - by matty on 04-09-2010 at 08:15 PM
RE: [Request] Disable/Enable. - by Seed on 04-09-2010 at 08:51 PM
RE: [Request] Disable/Enable. - by matty on 04-09-2010 at 09:45 PM
RE: [Request] Disable/Enable. - by Spunky on 04-09-2010 at 11:03 PM
RE: RE: [Request] Disable/Enable. - by Volv on 04-09-2010 at 11:18 PM
RE: [Request] Disable/Enable. - by Seed on 04-10-2010 at 10:54 AM


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