Shoutbox

Autochange personal message depending on location - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Autochange personal message depending on location (/showthread.php?tid=62127)

Autochange personal message depending on location by svenax on 06-30-2006 at 01:52 PM

Hallelujah! With the scripting support it is finally possible to automatically change the personal message (or name, for that matter) depending on where my laptop is, i.e depending on my current domain. I have wanted this feature for years.

Here's the script if anyone else is interested:

code:
function OnEvent_Initialize(MessengerStart)
{
    var PsmText = "In an unknown spot";
    var Shell = new ActiveXObject("WScript.Shell");
    var Domain = Shell.Environment("PROCESS").item("USERDOMAIN");

    if (Domain == "MYWORKDOMAIN")
        PsmText = "At work";
    else if (Domain == "MYHOMEDOMAIN")
        PsmText = "At home";

    Messenger.MyPersonalMessage = PsmText;
    MsgPlus.DisplayToast("", "PSM changed to '"+PsmText+"'");
}