What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Counter by the messages

Pages: (3): « First [ 1 ] 2 3 » Last »
Counter by the messages
Author: Message:
ThunderStorm
Junior Member
**

Avatar
I Love Zillah

Posts: 34
37 / Male / –
Joined: Mar 2006
O.P. Counter by the messages
I want a counter by the messages.
Example:

My name is robin (1233)
Is that possible?
Vote On Me
06-26-2006 09:46 AM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Counter by the messages
Kinda useless, but I did it anyway :P

Don't know how good it will work...

On import/restart of the script it makes an Registry key and it adds 1 everytime a message is send and includes the number in front of the message...

code:
function OnEvent_Initialize(MessengerStart)
{
  if (MessengerStart == false)
  {
    WriteRegistry("MessagesSend", "0");
  }
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  value = ReadRegistry("MessagesSend");
  WriteRegistry("MessagesSend", (parseInt(value) + 1));
  Message = "( " + value + " )   " + Message;
 
  return Message;
}

function WriteRegistry(key, value)
{
  var Shell = new ActiveXObject("WScript.Shell");
  var ValRegPath = MsgPlus.ScriptRegPath + key;
  Shell.RegWrite(ValRegPath, value);
}

function ReadRegistry(key)
{
  var Shell = new ActiveXObject("WScript.Shell");
  return value = Shell.RegRead(MsgPlus.ScriptRegPath + key);
}


[Image: 1-0.png]
             
06-26-2006 10:26 AM
Profile PM Web Find Quote Report
ThunderStorm
Junior Member
**

Avatar
I Love Zillah

Posts: 34
37 / Male / –
Joined: Mar 2006
O.P. RE: Counter by the messages
But how get I the counter after my messages?
Vote On Me
06-26-2006 11:12 AM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Counter by the messages
Edit this part:

Message = "( " + value + " ) " + Message;

to

Message = Message + "   ( " + value + " )";

but when I made it I found that before the message looked better so I put it there...
[Image: 1-0.png]
             
06-26-2006 11:16 AM
Profile PM Web Find Quote Report
ThunderStorm
Junior Member
**

Avatar
I Love Zillah

Posts: 34
37 / Male / –
Joined: Mar 2006
O.P. RE: Counter by the messages
does the script save the counter in the registery?
So, the counter doesn't every start by 0 as i logged in to wlm
Vote On Me
06-26-2006 11:46 AM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Counter by the messages
Yes, it saves it in the registry and only resets when you restart the script by disabling and enabling it by the plus! scripts preferences.
[Image: 1-0.png]
             
06-26-2006 11:49 AM
Profile PM Web Find Quote Report
ThunderStorm
Junior Member
**

Avatar
I Love Zillah

Posts: 34
37 / Male / –
Joined: Mar 2006
O.P. RE: Counter by the messages
But where is it saved in the registry?
Wich key?
Vote On Me
06-26-2006 12:05 PM
Profile E-Mail PM Find Quote Report
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
RE: Counter by the messages
the key "MessagesSend" in HKCU\Software\Patchou\Messenger Plus! Live then a subkey where your scripts keys are stored (I'm not sure which one)

This post was edited on 06-26-2006 at 12:13 PM by mathieumg.
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-26-2006 12:13 PM
Profile E-Mail PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Counter by the messages
HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\%script_name%\Settings\MessagesSend

That's where the amount is stored

This post was edited on 06-26-2006 at 12:33 PM by Ezra.
[Image: 1-0.png]
             
06-26-2006 12:32 PM
Profile PM Web Find Quote Report
qgroessl
Veteran Member
*****


Posts: 1615
Reputation: 22
33 / – / Flag
Joined: Jul 2005
Status: Away
RE: Counter by the messages
This script is safe right?... Norton says it's Malicious... I'm thinking only cause it writes in the registry?
06-26-2006 01:41 PM
Profile PM Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On