Shoutbox

Edit text in conversation - 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: Edit text in conversation (/showthread.php?tid=62420)

Edit text in conversation by pollolibredegrasa on 07-03-2006 at 01:52 PM

I had a brief glance through the scripting documentation, but didn't see anything I thought relevant.

Simply put, can I edit text displayed in the chat window?

Say I want to send a message "Blah Blah", can I make this appear in my conversation as "Hello" or something, but still actualy send the text "Blah Blah"?

It doesn't matter what the other user sees, it's just my screen I'm concerned about :)

Any help would be appreciated


RE: Edit text in conversation by Ezra on 07-03-2006 at 01:53 PM

Not with the normal scripting interface you can't maybe hooking with AA can do this...


RE: Edit text in conversation by pollolibredegrasa on 07-03-2006 at 01:54 PM

Ah, forget it then. Thanks anyway :)


RE: Edit text in conversation by The Brain on 07-03-2006 at 02:08 PM

Sure you can, using the OnEvent_MessageRecieved

something like

code:
if(Origin == Messenger.MyName) //Message is sent by you
{
    if(Message == "Blah Blah")//replace "Blah Blah" with "Hello!"
    {
        return "Hello!";
    }
}


unfortunately, the text you replace it with can't be any longer than what you actually send.

Not tested, but as far as I am aware, that is how this event works.
RE: Edit text in conversation by Ezra on 07-03-2006 at 02:09 PM

No, that will also change the text sent to the contact.


RE: Edit text in conversation by foaly on 07-03-2006 at 02:14 PM

no, it won't because it only happens on a recieved message...


RE: RE: Edit text in conversation by The Brain on 07-03-2006 at 02:18 PM

Thankyou foaly, that is right. I just tested it, and it will be replaced in your screen, but not your contact's.

Here is the exact code I used

code:

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    if(Origin == Messenger.MyName)
    {
        if(Message == "Blah Blah")
        {
            return "Hello!";
        }
    }
    return Message;
}


Have fun with whatever you want to use this to develop, fatfreechicken
RE: Edit text in conversation by Ezra on 07-03-2006 at 02:30 PM

:o, you are right, I thougt if you returned a message on ReceivedMessage it also sent that to the contact.