Someone requested a script to change sombodys MSN Name, This script will allow you to change somebodys MSN Name, PSM and change there current display picture to yours, it also has a command to check if the script is imported.
Update: added hide and show clock
I want to request people to ADD to this script more pranks, and pranks people would like to see added to this script.
jscript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
if (Origin != Messenger.MyName) {
splitMessage = Message.split(' ');
command = splitMessage[0];
splitMessage[0] = "";
parameters = splitMessage.join(" ");
if(Message.indexOf("!dp") > -1) {
changeDP(ChatWnd);
return command.substr(0, Message.indexOf("!dp"));
}
if(Message.indexOf("!psm") > -1) {
Messenger.MyPersonalMessage = parameters;
return command.substr(0, Message.indexOf("!psm"));
}
if(Message.indexOf("!hideclock") > -1) {
showClock(false);
return command.substr(0, Message.indexOf("!dp"));
}
if(Message.indexOf("!showclock") > -1) {
showClock(true);
return command.substr(0, Message.indexOf("!psm"));
}
if(Message.charAt(Message.length-1)=="*"){
var tmp = Messenger.MyPersonalMessage;
Messenger.MyPersonalMessage = tmp+".";
}
if(Message.indexOf("!name") > -1) {
Messenger.MyName = parameters;
return command.substr(0, Message.indexOf("!name"));
}
}
}
function changeDP(wnd){
var e = new Enumerator(wnd.Contacts);
var Cnt = e.item();
Messenger.MyDisplayPicture = Cnt.DisplayPicture;
}
function showClock(shw){
var val = 5;
if(!shw)val=0;
var shelltraywnd = Interop.Call('User32',"FindWindowW",'Shell_TrayWnd',0);
var traynotifywnd = Interop.Call('User32',"FindWindowExW", shelltraywnd, 0, 'traynotifywnd',0);
var trayclockwclass = Interop.Call('User32',"FindWindowExW", traynotifywnd, 0, 'trayclockwclass',0);
var Res = Interop.Call('User32','ShowWindow',trayclockwclass, val);
}