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:
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. Hide send / received message
Hi,
Is there a way to hide an antire incoming message inside an active chat window when I am receiving one
Same for outgoing - Is there a way to write a message, prees "enter", send the message but it wont appear as a new line in the chat window?
Thank!
Hen.
04-27-2009 10:09 PM
Profile E-Mail PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: Hide send / received message
Hi,
It is very rare here to receive zero replies....
Is it impossible or is it too simple that no one replied ... :-)   ?

I want that when a message is received and has a certain content, it wil be ignored and not presented on the screen.
You can change each character from "Message to be ignored" to blank characters, but then you will still have the "XX says:", which might by annoying if the same message repeats too many times.

Have any idea?

Thanks,
Hen.
04-30-2009 07:51 PM
Profile E-Mail PM Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
RE: Hide send / received message
Yes this is very possible, I think the lack of replies was because you weren't very clear about what you wanted. Since what you are asking is still vague I'm just going to say that you will need to use the functions OnEvent_ChatWndReceiveMessage and OnEvent_ChatWndSendMessage then detect if the message is one you wanted removed. If it is then you will return an empty string, and if it isn't then you will just return the original message.
04-30-2009 08:10 PM
Profile E-Mail PM Web Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: RE: Hide send / received message
Hi,
quote:
Originally posted by Baggins
I think the lack of replies was because you weren't very clear about what you wanted.... If it is then you will return an empty string, and if it isn't then you will just return the original message.

I try again with an example
Hani and Baggins chat in a conversation window.
Hani send Baggins the message: "Bla bla".
Nothing happens on Baggins screen,
and... - when Hani pressed enter, also it seemed like he never sent that message - "Hani says: Bla bla" never appeared on his screen also.

Using the "OnEvent_ChatWndReceiveMessage" and replacing the "Bla bla" with blank characters will show a new line "Hani says: " no?
and then if I keep on saying "bla bla" it will make a lot of new empty lines on your computer, no? - and I want to avoid it.

Did I sucess clarifying my question?
Can I do that?
Thanks!

This post was edited on 04-30-2009 at 08:31 PM by Hen.
04-30-2009 08:30 PM
Profile E-Mail PM Find Quote Report
Baggins
Full Member
***

Avatar
B000ALFAZO

Posts: 387
Reputation: 13
29 / Male / Flag
Joined: Oct 2006
RE: Hide send / received message
You can make your messages not show up on either screen but you can only make the other person's messages not show up on your screen.
EDIT: Instead of replacing them with blank characters, just remove them.

This post was edited on 04-30-2009 at 08:36 PM by Baggins.
04-30-2009 08:31 PM
Profile E-Mail PM Web Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: RE: Hide send / received message
Hi,
did you mean for - "ChatWnd::EditText" ?
If I check the content of the sent message, and then return "", then it really doesn't show the words on screen, but did the original message was sent?
I dont want to show the sent message on both computers, but I do want to send it. (if the message was received the script will do something, but will not show the received message)
Thanks.

This post was edited on 04-30-2009 at 09:09 PM by Hen.
04-30-2009 08:44 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
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):
js 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
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: Hide send / received message
Hi,
Thanks.
It was  a very thorough response.

Can we solve this in a different approach? :
When I click on "video" in a chat conversation, a request is send to my contact, and no message is written in the message line.
Can we mimic this?
Can I define a new command in the script, both me and my contact will have the script, and then I will actually send him a command and not a message, thus maybe we can make it invisible in the message line?
For instance, i will send the Messenger.StartVideo(Contact) command, only it will be a different command, one that I will make up (not part of Messenger API).

Regarding the zero replies - it came from a positive point of view, as I appreciate the short time it usually takes to ppl here to reply, almost about everything.
Cheers,
Hen.

This post was edited on 05-01-2009 at 10:39 AM by Hen.
05-01-2009 09:31 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: Hide send / received message
quote:
Originally posted by Hen
When I click on "video" in a chat conversation, a request is send to my contact, and no message is written in the message line.
Can we mimic this?
You can (see your other thread) for most existing menu items.

quote:
Originally posted by Hen
Can I define a new command in the script, both me and my contact will have the script, and then I will actually send him a command and not a message, thus maybe we can make it invisible in the message line?
Nope...

PS: a normal text message is also a "command" as you call it ("communication protocol message" would be a more accurate description). It simply is a series of "commands" to show some text in the chat window. But you can't invent new "commands" which don't exist yet*.

* Actually, in theory, you can, but that would be tampering with the underlying communication protocol and it would require you to be able to send and recieve raw protocol messages, meaning you need a proxy, which is not possible in Plus! scripting for obvious security and stability reasons... Also, both your Messenger and the Messenger of your contacts need to be able to recieve those 'new' commands and thus need to be altered.... so in short: no, you can't

This post was edited on 05-12-2009 at 09:34 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-04-2009 04:19 AM
Profile PM Find Quote Report
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. RE: Hide send / received message
Hi all,
Just wanted to say thank you for your replies and help, for both of the threads.
I downloaded the program, and its really cool.
I guess that if I will deapen with this one, I'll post some more questions.
Have a great weekend.
Hen.
05-11-2009 02:20 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