What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » "" return value for event ReceiveMessage

Pages: (2): « First [ 1 ] 2 » Last »
"" return value for event ReceiveMessage
Author: Message:
Mr. Bougo
Junior Member
**


Posts: 51
33 / Male / –
Joined: Jun 2006
O.P. "" return value for event ReceiveMessage
When you do something like that:
code:
OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,MessageMessageKind) {
    return "";
}

It does

quote:
Mr. Bougo says:






It would be better if it didnt display any message, nope?
06-27-2006 04:22 PM
Profile PM Find Quote Report
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
RE: "" return value for event ReceiveMessage
quote:
Originally posted by Scripting documentation

Because Messenger Plus! analyses messages received only when they reach the chat window...It is important to remember that the new message cannot be longer than the original one (Message.length) and will be cut if necessary. Also, Messenger will not re-parse the message for emoticons codes.


All of this because Plus! intercepts the message in the chat window itself, not before.
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-27-2006 04:26 PM
Profile E-Mail PM Web Find Quote Report
upsfeup
Junior Member
**


Posts: 67
Joined: Feb 2005
RE: "" return value for event ReceiveMessage
Yes.. it would..

and about just return? with no value?
06-27-2006 04:27 PM
Profile E-Mail PM Find Quote Report
Mr. Bougo
Junior Member
**


Posts: 51
33 / Male / –
Joined: Jun 2006
O.P. RE: "" return value for event ReceiveMessage
Huh...


It's a simplified script, lol...


It would be useful for ignoring messages, like the /xignore feature in Stuffplug does... But if i return ""; it shows the "Mr. Bougo says:" instead of nothing...


The test script i made was:
code:
OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,MessageMessageKind) {
    Debug.Trace("Message received from " + Origin + ": " + Message)
    return "";
}
(it was only a test script, heh)

And it showed me the "Mr. Bougo says:", and i think it would be better if it showed nothing... Maybe in next release of MP!L :)



EDIT: Upseuf, lets try this...


No, it doesnt work...

I tried null too, and i tried to var temp = new String(); and return temp; and it didnt work, all those tests returns Message like if the script was disabled, but it isnt, and it doesnt bug... Only the return ""; works and it displays "Mr. Bougo says:"


EDIT2: Mathieumg, if MP!L can remove a line in the textbox, i think it can remove the line above too, so maybe Patchou will modify the return function for the ReceiveMessage event :)


EDIT3 (lol that post is getting long): If it can't, I'll wait for Stuffplug 3 release and use ChatWnd.SendMessage("/xignore"); heh, no problem :)

This post was edited on 06-27-2006 at 04:41 PM by Mr. Bougo.
06-27-2006 04:31 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: "" return value for event ReceiveMessage
Don't return "":

use

code:
return false;

This post was edited on 06-27-2006 at 04:48 PM by matty.
06-27-2006 04:47 PM
Profile E-Mail PM Find Quote Report
Mr. Bougo
Junior Member
**


Posts: 51
33 / Male / –
Joined: Jun 2006
O.P. RE: "" return value for event ReceiveMessage
Tried it too, doest work :p
06-27-2006 08:05 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: "" return value for event ReceiveMessage
Because it only changes the message, so the username says: part stays unchanged
[Image: 1-0.png]
             
06-27-2006 08:07 PM
Profile PM Web Find Quote Report
can16358p
Junior Member
**

WLM + MP!L User

Posts: 58
34 / Male / –
Joined: Oct 2005
Status: Away
RE: "" return value for event ReceiveMessage
Just as idea, I'm not sure if that's readonly or not, but if not, try changing the message kind and see what happens.
[Image: anathema.gif][Image: hax0r.png]
06-27-2006 08:21 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: "" return value for event ReceiveMessage
You can't change the message kind...
06-27-2006 08:44 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: "" return value for event ReceiveMessage
Wait I think your using the wrong function...

The OnEvent_ChatWndSendMessage event is fired every time the current user sends a message in a chat window.

This post was edited on 06-27-2006 at 08:52 PM by matty.
06-27-2006 08:49 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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