What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Hide send / received message

Hide send / received message
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Hide send / received message
Hen, it is not possible to do _exactly_ what you want.

You can only change the text which is recieved in your own chat window, thus not on the contact's side. And it can't be longer than the original recieved text (not a problem your case). But also, you can not completely discard it as in not showing anything; there will always be a line shown, albite it may be an empty line.

Also remember, if you modify the sent text, then the modified text is send, not the thing you originally typed (scripts parse the sent text before it is actually send to your contacts). To put it very simply: If you type "Hello World" and a script changes that text to "BlahBlah" then "BlahBlah" will be send to your contact.

Note also that the text you've send will again be recieved (almost instantly) by you too.

Putting things together (in an very easy way; thus far from foolproof):
Javascript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
    if (MsgKind === 1 | MsgKind === 6) {
        if (Message === "/DoTheMacarena") {
            if (Origin === Messenger.MyName){
                Debug.Trace("command send")
            } else {
                Debug.Trace("command received")
            }
            return ""
        }
    }
}
 
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    if (Message = "Hello World") {
        return "/DoTheMacarena"
    }
}

- If the user types "Hello World", then the command "/DoTheMacarena" is send to your contact (your contact WILL see "/DoTheMacarena").
- Since you also recieve your own sent text, the command "/DoTheMacarena" will be send to you also. And thus it is in the RecievedMessage event that you can change the _displayed_ text to an empty line.
But note that this changed displayed text is only on YOUR side. And also note that there will be a line shown, eventhough you changed the text to an empty line; you can not discard it or hide the chat line completely.

---

I very very strongly suggest to read the help that comes with the scripting engine and especially the help about the two events shown above (choose "Scripting Documentation" from the "Files" menu in the script editor).







---------

quote:
Originally posted by Hen
It is very rare here to receive zero replies....
Is it impossible or is it too simple that no one replied ... :-)
Not really, there are a lot of threads with no replies. Anyways, be more patient. This forum is very active, as you know, which means a lot of threads are created all the time, meaning an older message will quickly drop down the list of new threads. Give it a few more days (instead of just 1) in the futur... Also, on this forum it is custom to not reply with stuff like "I don't know". So people who don't know or can't answer a question will not spam a thread with non-helpfull posts; doesn't mean your post isn't read though.

;)

This post was edited on 05-01-2009 at 04:20 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-01-2009 04:08 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Hide send / received message - by Hen on 04-27-2009 at 10:09 PM
RE: Hide send / received message - by Hen on 04-30-2009 at 07:51 PM
RE: Hide send / received message - by Baggins on 04-30-2009 at 08:10 PM
RE: RE: Hide send / received message - by Hen on 04-30-2009 at 08:30 PM
RE: Hide send / received message - by Baggins on 04-30-2009 at 08:31 PM
RE: RE: Hide send / received message - by Hen on 04-30-2009 at 08:44 PM
RE: Hide send / received message - by CookieRevised on 05-01-2009 at 04:08 AM
RE: Hide send / received message - by Hen on 05-01-2009 at 09:31 AM
RE: RE: Hide send / received message - by CookieRevised on 05-04-2009 at 04:19 AM
RE: Hide send / received message - by Hen on 05-11-2009 at 02:20 PM


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