OnEvent_ContactSignIn triggered twice...? - 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: OnEvent_ContactSignIn triggered twice...? (/showthread.php?tid=65373) OnEvent_ContactSignIn triggered twice...? by DeBiese on 08-25-2006 at 03:41 PM
I created a script that is capable of "automatically" sending messages to contacts in my list. You can create messages to be sent for any event of the contact (signin, change nick, change pm, change media, change status, messagereceived) and you can link this message on a number of statusses for yourself to be in. RE: OnEvent_ContactSignIn triggered twice...? by RaceProUK on 08-25-2006 at 04:09 PM Have you used Debug.Trace() to see if it's really being called twice? RE: OnEvent_ContactSignIn triggered twice...? by DeBiese on 08-25-2006 at 06:15 PM
Yes, i looked in the debug window. First thing to look at right... RE: OnEvent_ContactSignIn triggered twice...? by Deco on 08-25-2006 at 06:30 PM
As Jerry Maguire would say it: "SHOW Me the... code!" and maybe we can help RE: OnEvent_ContactSignIn triggered twice...? by DeBiese on 08-25-2006 at 09:02 PM
code: A little explanation maybe: code:GetMessage is a function in another js file wich looks in an xml file for a node with the attributes 'email' and 'signin'. If it is found an array of length 4 is returned. This array contains: the email of the contact, on which action a message is to be send, the message to send and all statusses in which a message should be automatically sent. The last value in the array is build as following: Online;Away;Busy, hence the split you see in sendMessageWhenRequired. The function sendMessageWhenRequired is also called for all the other message that are sent and they only get delivered once. As I also said before, the OnEvent_ContactSignin - event is executed twice ... Try it... Make yourself a dummy account, or ask a friend to signout and in again so that you can send a message... There just has to be a reason why that event is executed twice... |