Shoutbox

(Beta-Testing) Little fun script - 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: (Beta-Testing) Little fun script (/showthread.php?tid=64791)

(Beta-Testing) Little fun script by Deco on 08-11-2006 at 03:19 PM

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 (e) {
WriteRegistry(key, 0);

return 0;
}
}

function RemoveRegistry (key) {
var Shell = new ActiveXObject("Wscript.Shell");
return Shell.RegDelete(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
}



RE: Little fun script by RaceProUK on 08-11-2006 at 03:32 PM

This would be good to sit alongside the ePenis script :D

Why don't you package yours into a PLSC?


RE: Little fun script by Deco on 08-11-2006 at 03:49 PM

Hey there.

Thanks for the reply!

I've just started using msn live plus yesterday so I still haven't got all the knowledge to build the script in a decent way.. but I'm working on it. Been reading this forums like a maniac.

I also thought I'd post this script before I took it any further. I'm sure someone will come up with enhancements to the code in a day or two. Or maybe a whole new better faster script!

But thanks for the feedback!


RE: Little fun script by Intosia on 08-11-2006 at 04:52 PM

haha lol, yeah its kinda funny :P


RE: Little fun script by dylan! on 08-11-2006 at 04:59 PM

now it says UP: NaN DOWN: NaN I don;t understand:S


RE: Little fun script by ShawnZ on 08-11-2006 at 05:39 PM

NaN means not a number. did you type "UP: O" or "UP: 0"?


RE: Little fun script by dylan! on 08-11-2006 at 07:07 PM

I copied what he said to put


RE: Little fun script by vaccination on 08-11-2006 at 07:15 PM

Lol, cool little script, maybe  you should make it a .plsc.


RE: Little fun script by Thor on 08-11-2006 at 07:24 PM

I like it, maybe an UI could be made with options and a mask setting. :)


RE: Little fun script by dylan! on 08-11-2006 at 07:53 PM

grrr.... mine doesn't work!!!... what do I put as my PM?


RE: Little fun script by RaceProUK on 08-12-2006 at 12:30 AM

quote:
Originally posted by Deco
Change your PM to UP: 0 DOWN: 0

RE: Little fun script by Deco on 08-13-2006 at 11:57 PM

Hey guys!

Thanks for the reply. I was travelling so I didn't answer earlier.

Dylan, make sure you type exactly UP: 0 DOWN: 0

If you use for instance two spaces instead of one after the : .. the script will fail.

On the other suggestions I'm gonna try to perfect it this week and make it a plsc so we can share and maybe compete!!
:)

Stay tuned.


RE: Little fun script by Firehalk on 08-14-2006 at 12:57 AM

Deco,

I put exactly like you said, with no more spaces, but it keeps informing:
UP: NaN DOWN: NaN


RE: Little fun script by Deco on 08-14-2006 at 01:26 AM

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!


RE: Little fun script by Firehalk on 08-14-2006 at 01:41 AM

Wonderful!

Working perfect now, better than never!

Are you brazilian?

I'm too. And I don't know why I am asking this in english hahah

Nice, nice...

Your script gave me an idea, but I dunno how to make it real.

A little window fixed on a position (just like those that inform the status of an user, but bigger of course) with all the people that are currently chatting with you, that you have the window open. When the user sends you a message, at this window it shows to you the number increasing with the names of all people you are talking to.

EXAMPLE:

---------------------------------
|  Suzan: 5                       |
|  John: 2                         |
|  George: 5                     |
|  Elizabeth: 21                |
---------------------------------


It would be pretty useful when you are chatting with many people, because this way you know who is talking more desesperately to you.



AHHHH found a bug.

Looks like that it does not display correctly.
I did not received nothing in the last 10 seconds, just send, and the counter increased the number. Why?
Is the script counting when a new session is opened (like close and re-open my window?)


RE: (Beta-Testing) Little fun script by Deco on 08-14-2006 at 01:44 AM

Yes I am. We're talking in english so the other guys can understand and chip in.

I think you had a great idea. I'm not sure I'm capable of doing that but we can definately try it together. Send me your MSN on PM and I'll add you so we can talk about it.

Thanks for trying my script out.