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();
}