This is a little fun script I've made to compete with my friends to see who gets more messages in a regular day. My sister also noted that I talk way mroe than I listen.. and I could see that with this script. For the first hour I had like 200 msgs UP and 150 down!
Let me know how much you talk!!!
Thanks!
Edit:
Ok guys I just got home and I finished a newer, cleaner, smarter and better version.
I packed it into a plsc so you can install it.
I made it so that the script saves your number of messages up and down into the registry (as you can see in the code).
I'm always open to suggestions I hope this version works for most of you and please keep me posted!
Thanks!
ps: script code bellow
------------- code -------------------
var nUp = 0;
var nDown = 0;
function OnEvent_ChatWndSendMessage(ChatWnd,Message) {
nUp++;
UpdateMessage();
return Message;
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if(Origin != Messenger.MyName) {
nDown++;
}
UpdateMessage();
}
function UpdateMessage() {
Messenger.MyPersonalMessage = "UP: "+ nUp + " DOWN: " + nDown;
}
function OnEvent_Initialize(MessengerStart)
{
nUp = ReadRegistry("MessageCounterUP");
nDown = ReadRegistry("MessageCounterDOWN");
UpdateMessage();
}
function OnEvent_Uninitialize(MessengerExit)
{
WriteRegistry("MessageCounterUP",nUp);
WriteRegistry("MessageCounterDOWN",nDown);
}
function WriteRegistry (key, value) {
var Shell = new ActiveXObject("WScript.Shell");
return Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key, value, "REG_SZ");
}
function ReadRegistry (key) {
var Shell = new ActiveXObject("WScript.Shell");
try {
return Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
} catch
{
WriteRegistry(key, 0);
return 0;
}
}
function RemoveRegistry (key) {
var Shell = new ActiveXObject("Wscript.Shell");
return Shell.RegDelete(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
}