What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Problem with ChatWndReceiveMessage's Message parameter

Problem with ChatWndReceiveMessage's Message parameter
Author: Message:
higher
New Member
*


Posts: 2
Joined: Oct 2006
O.P. Problem with ChatWndReceiveMessage's Message parameter
Hi!

I want to make a script which replaces the built-in time indicator of messenger. So i would like to see the time of sending before every received and sent lines.

I tried to achieve this with the following code:

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind )
{
    var a = new Date;   
    MsgPlus.DisplayToast("",Message);
    return Message=a+Message;
   
}

The problem is, that the a variable overwrites the beginning of the Message string. It seems that Message has a fixed length, and it cannot be extended, so my received messages' first letters are always overwritten by the date variable.
Sorry for language, and the basic question.
10-17-2006 06:19 PM
Profile E-Mail PM Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: Problem with ChatWndReceiveMessage's Message parameter
yes the string you return can't be longer then the string that gets in...
10-17-2006 06:23 PM
Profile E-Mail PM Find Quote Report
higher
New Member
*


Posts: 2
Joined: Oct 2006
O.P. RE: Problem with ChatWndReceiveMessage's Message parameter
But there must be a solution for this problem, i don't want to believe that the script engine's possibilities are so limited.
10-20-2006 04:41 PM
Profile E-Mail PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Problem with ChatWndReceiveMessage's Message parameter
quote:
Originally posted by higher
But there must be a solution for this problem, i don't want to believe that the script engine's possibilities are so limited.
There isn't as far as i know. And the scripting engine is limited.
10-20-2006 04:49 PM
Profile E-Mail PM Web Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
34 / Male / –
Joined: Jun 2004
RE: Problem with ChatWndReceiveMessage's Message parameter
quote:
Originally posted by higher
But there must be a solution for this problem, i don't want to believe that the script engine's possibilities are so limited.
I imagine the reason for the limit is due to the way plus puts the returned value back into messenger.

Messenger will have already put the origional message into memory and allocated a set size of memory for it. When plus goes to give messenger the new string that you return, if that string is longer than the origional one it wont fit in the space its given. Hence the limit.

This post was edited on 10-20-2006 at 05:18 PM by Plik.
10-20-2006 05:15 PM
Profile PM Find Quote Report
« 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