What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP - No error, no action...

HELP - No error, no action...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. HELP - No error, no action...
It flips the status, or at least it did until I did something to it that stops it working.
js code:
var Activity = "Disabled";

var Messenger = 14;
var Mode = "All Values";
var Refresh = 1000;  // will add a method of changing this later

var OldStatus;

MsgPlus.AddTimer("FlipStatus", Refresh);

function OnGetScriptMenu (nLocation)
{
    Menu = '<ScriptMenu>';
   
    if (Activity == "Enabled")
    {
        Menu += '<MenuEntry Id=\"Activity\">Disable Flip Status...</MenuEntry>';
    }
    else
    {
        Menu += '<MenuEntry Id=\"Activity\">Enable Flip Status...</MenuEntry>';
    }
   
    Menu += '<Separator/>';
   
    if (Activity == "Enabled" || Mode == "On/Off Only")
    {
        Menu += '<MenuEntry Id=\"Messenger\" Enabled=\"false\">Messenger: ' + Messenger + '</MenuEntry>';
    }
    else
    {
        Menu += '<MenuEntry Id=\"Messenger\">Messenger: ' + Messenger + '</MenuEntry>';
    }
   
    if (Activity == "Enabled")
    {
        Menu += '<MenuEntry Id=\"Mode\" Enabled=\"false\">Mode: ' + Mode + '</MenuEntry>';
        Menu += '<MenuEntry Id=\"Refresh\" Enabled=\"false\">Refresh: ' + Refresh + 'ms</MenuEntry>';
    }
    else
    {
        Menu += '<MenuEntry Id=\"Mode\">Mode: ' + Mode + '</MenuEntry>';
        Menu += '<MenuEntry Id=\"Refresh\">Refresh: ' + Refresh + 'ms</MenuEntry>';
    }
   
    Menu += '</ScriptMenu>';
         
    return Menu;
}

function OnEvent_MenuClicked (sMenuId, nLocation, iOriginWnd)
{
    if (sMenuId == "Activity")
    {
        if (Activity == "Enabled")
        {
            Activity = "Disabled";
            Messenger.MyStatus = OldStatus;
        }
        else if (Activity == "Disabled")
        {
            OldStatus = Messenger.MyStatus;
            Activity = "Enabled";
        }
    }
    if (sMenuId == "Messenger")
    {
        if (Messenger == 9)
        {
            Messenger = 14;
        }
        else if (Messenger == 14)
        {
            Messenger = 9;
        }
    }
    if (sMenuId == "Mode")
    {
        if (Mode == "All Values")
        {
            Mode = "On/Off Only";
        }
        else if (Mode == "On/Off Only")
        {
            Mode = "All Values";
        }
    }
}

function OnEvent_Timer(TimerId)
{
    if (TimerId == "FlipStatus")
    {
        if (Activity == "Enabled")
        {
            if (Mode == "All Values")
            {
                if (Messenger == 9)
                {
                    switch (Messenger.MyStatus)
                    {
                        case 3:
                            Messenger.MyStatus = 4;
                            break;
                        case 4:
                            Messenger.MyStatus = 5;
                            break;
                        case 5:
                            Messenger.MyStatus = 7;
                            break;
                        case 7:
                            Messenger.MyStatus = 8;
                            break;
                        case 8:
                            Messenger.MyStatus = 9;
                            break;
                        case 9:
                            Messenger.MyStatus = 3;
                            break;
                        default:
                            Messenger.MyStatus = 3;
                            break;
                    }
                }
                else if (Messenger == 14)
                {
                    switch (Messenger.MyStatus)
                    {
                        case 3:
                            Messenger.MyStatus = 4;
                            break;
                        case 4:
                            Messenger.MyStatus = 7;
                            break;
                        case 7:
                            Messenger.MyStatus = 3;
                            break;
                        default:
                            Messenger.MyStatus = 3;
                            break;
                    }
                }
            }
            else if (Mode == "On/Off Only")
            {
                switch (Messenger.MyStatus)
                {
                    case 2:
                        Messenger.MyStatus = 3;
                        break;
                    case 3:
                        Messenger.MyStatus = 2;
                        break;
                    default:
                        Messenger.MyStatus = 3;
                        break;
                }
            }
        }
        MsgPlus.AddTimer("FlipStatus", Refresh);
    }
}

It's probably something really obvious, but I've been looking at it for 20 minutes and I don't see what's up with it.  If it helps, I found out (using the script debugger) that it always reaches the "switch (Messenger.MyStatus)" bit, but it just doesn't match the number with the status, even though it did before.  Can anyone explain what I must have missed?
04-28-2009 07:50 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
HELP - No error, no action... - by whiz on 04-28-2009 at 07:50 PM
RE: HELP - No error, no action... - by Spunky on 04-29-2009 at 05:55 AM
RE: HELP - No error, no action... - by Matti on 04-29-2009 at 10:56 AM
RE: HELP - No error, no action... - by whiz on 04-29-2009 at 06:14 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