What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » question - manipulate text on sender side

question - manipulate text on sender side
Author: Message:
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. question - manipulate text on sender side
Hi,
Is there a way that after the user will send the message, it will appear differently only on his side?
When using 'Messgae.replace' it will change the text as I want, but I want only the sender to see the change, and that the receiver will get the message untouched.
Thanks.

This post was edited on 03-30-2008 at 11:05 AM by Hen.
03-30-2008 11:00 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: question - manipulate text on sender side
Change it in the Received message function rather than the send message.  This function is fired after the message has already been sent to the recipient.  The problem is that the message cannot be any longer than the original message.
[Image: markee.png]
03-30-2008 11:11 AM
Profile PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: question - manipulate text on sender side
Bu then, also the message is changed according to the pre defined parameters also when I receive a message.
I only want to change the sent message, and only on the sender screen...
03-30-2008 11:45 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: question - manipulate text on sender side
Well then limit the origin from which the message comes from.  It should be your display name.  Try something like this.

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
    if(MessageKind === 1 && Origin === Messenger.MyName){
        return Message.replace(/\b([a-z])([a-z]*)([a-z])\b/gi,"$3$2$1");//Switch the first and last letter of each word
    }
}

This post was edited on 03-30-2008 at 12:04 PM by markee.
[Image: markee.png]
03-30-2008 12:03 PM
Profile PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: question - manipulate text on sender side
Great.
Thanks markee!
03-30-2008 12:12 PM
Profile E-Mail 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