Shoutbox

order functions sendmessage and receivemessage... ?? - 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: order functions sendmessage and receivemessage... ?? (/showthread.php?tid=84666)

order functions sendmessage and receivemessage... ?? by Suxsem on 07-04-2008 at 05:32 PM

Hi...if I have 2 scrips...:

script 1:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
return Message + "a"
}

script 2:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
return Message + "b"
}

if I send message "HI" the message will be HIab or HIba?? Why?
Thank and sorry for bad english!


RE: order functions sendmessage and receivemessage... ?? by roflmao456 on 07-04-2008 at 06:13 PM

you are returning the message plus a letter..

you can also change the message sent by doing "return 'blahblah';"


in that case it will be HIab

.. depends on what the script is called. (alphabetical order)
RE: order functions sendmessage and receivemessage... ?? by Suxsem on 07-04-2008 at 06:31 PM

you are not understan me :)

i search the messenger plus order of return...in more script!


RE: order functions sendmessage and receivemessage... ?? by MeEtc on 07-04-2008 at 07:12 PM

I think the person is asking what order is a sent message parsed in when you have multiple scripts that modify the text.

one script adds an "a" to the end, and a second script adds a "b".
What order are scripts executed, thus what will the resulting text be when its sent


RE: order functions sendmessage and receivemessage... ?? by Suxsem on 07-04-2008 at 07:59 PM

exact MeEtc!!! Who help me please? Thank!


RE: order functions sendmessage and receivemessage... ?? by Ezra on 07-04-2008 at 09:03 PM

quote:
Originally posted by roflmao456
in that case it will be HIab

.. depends on what the script is called. (alphabetical order)

The answer was already giving.

It's the alphabetical order of the scripts name.
RE: order functions sendmessage and receivemessage... ?? by Suxsem on 07-04-2008 at 09:29 PM

sorry...i don't read this message!
thank for all! bye


RE: order functions sendmessage and receivemessage... ?? by Suxsem on 07-05-2008 at 08:49 AM

emh...another answer :)
it's possible to change this order?


RE: order functions sendmessage and receivemessage... ?? by Matti on 07-05-2008 at 08:53 AM

quote:
Originally posted by Suxsem
it's possible to change this order?
No, unfortunately, it's not possible. You could try to detect when the message has already been processed by the other script before, but the best thing (if both scripts were made by you) is to merge the script and provide options for the user to choose what should be added first. Of course, the cheapest way would be to rename one script. :P
RE: order functions sendmessage and receivemessage... ?? by CookieRevised on 07-05-2008 at 09:45 AM

This issue should normally never come up though. Unless you have a bad written script in case of replacements in texts, or two scripts with the same functions (in case of additions in the texts).

It never has been an issue before and there are already hundreds and hundreds of scripts floating around, so...

So, Suxsem, why do you ask this question, what do you have in mind or what are you trying todo? There might be a far better way to do what you want...