What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Is there a script?

Is there a script?
Author: Message:
davidpolitis
Full Member
***


Posts: 371
Reputation: 16
Joined: Aug 2006
RE: Is there a script?
I started work on something if anyone wants to finish it... I cbf.

code:
var Shell = new ActiveXObject("WScript.Shell");
var RegPath = MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\Enabled";

function isEnabled()
{
    try
    {
        val = Shell.RegRead(RegPath);
        if(val == "0")
        {
            return false;
        }
    }
    catch (err)
    {
          Shell.RegWrite(RegPath, "1");
    }
    return true;
}

function OnGetScriptMenu(Location)
{
    Menu = "<ScriptMenu>";
    if (isEnabled())
        Menu += "<MenuEntry Id=\"Disable\">Disable</MenuEntry>";
    else
        Menu += "<MenuEntry Id=\"Enable\">Enable</MenuEntry>";
    Menu += "</ScriptMenu>";
    return Menu;
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
    if (MenuItemId == "Disable")
    {
        Shell.RegWrite(RegPath, "0");
    }
    else
    {
        Shell.RegWrite(RegPath, "1");
    }
}

function ChangePSM()
{
    if(isEnabled())
    {
        var PSM;
        switch (NewStatus)
        {
            case 2:
            PSM = "Appear Offline";
            break;
            case 3:
            PSM = "Online";
            break;
            case 4:
            PSM = "Busy";
            break;
            case 5:
            PSM = "Be Right Back";
            break;
            case 6:
            PSM = "Idle";
            break;
            case 7:
            PSM = "Away";
            break;
            case 8:
            PSM = "In a Call";
            break;
            case 9:
            PSM = "Out to Lunch";
            break;
            default:
            PSM = Messenger.MyPersonalMessage;
        }
        Messenger.MyPersonalMessage = PSM;
    }
}

function OnEvent_Initialize(MessengerStart)
{
    if (!MessengerStart) // if messenger is signed in
    {
        ChangePSM();
    }
}

function OnEvent_MyStatusChange(NewStatus)
{
    ChangePSM();
}
02-27-2010 10:40 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Is there a script? - by BlitZeR on 02-26-2010 at 01:35 PM
RE: Is there a script? - by djdannyp on 02-26-2010 at 01:53 PM
RE: RE: Is there a script? - by BlitZeR on 02-26-2010 at 01:54 PM
RE: Is there a script? - by AngelDevil on 02-26-2010 at 09:10 PM
RE: Is there a script? - by billyy on 02-26-2010 at 09:46 PM
RE: Is there a script? - by davidpolitis on 02-26-2010 at 11:49 PM
RE: Is there a script? - by billyy on 02-27-2010 at 01:04 AM
RE: Is there a script? - by BlitZeR on 02-27-2010 at 08:34 AM
RE: Is there a script? - by AngelDevil on 02-27-2010 at 11:08 AM
RE: Is there a script? - by billyy on 02-27-2010 at 11:39 AM
RE: Is there a script? - by AngelDevil on 02-27-2010 at 01:08 PM
RE: Is there a script? - by davidpolitis on 02-27-2010 at 10:40 PM
RE: RE: Is there a script? - by CookieRevised on 02-27-2010 at 11:05 PM
RE: Is there a script? - by davidpolitis on 02-27-2010 at 11:22 PM
RE: Is there a script? - by CookieRevised on 02-27-2010 at 11:25 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