What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Simple Problem w/ Objects

Simple Problem w/ Objects
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Simple Problem w/ Objects
quote:
Originally posted by matty
With that said this is the easiest way of knowing if you sent the message. If the messages do not match well than you know you didn't send it.
Unfortunatly, I see you use that kind of approach in many example codes of yours. Although it would work in theory, it is not implemented properly in any of your example codes and thus will not work properly!

You will get into trouble when the contact sends the same message (at a certain point in time) as you last did:

You: Type the next command to initiate the transfer:
You: !start
Contact: Ah, ok, thanks. I'l send the command now
Contact: !start
Contact: nothing happened :(
You: Hmm, the code in OnEvent_ChatWndReceiveMessage was never executed...
...

^^ the above scenario will show exactly what I mean...

To solve that you must delete oChatWnds[pChatWnd.Handle] before you return with sMessage in OnEvent_ChatWndReceiveMessage
Javascript code:
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind ) {
    if (oChatWnds[pChatWnd.Handle] === sMessage ) {
        delete oChatWnds[pChatWnd.Handle];        return sMessage; // Since we just send this message we can ignore it
    }
    ...
}


;)

This post was edited on 11-23-2009 at 10:25 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-23-2009 09:47 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Simple Problem w/ Objects - by Cetanu on 09-15-2009 at 02:34 PM
RE: Simple Problem w/ Objects - by matty on 09-15-2009 at 02:45 PM
RE: Simple Problem w/ Objects - by Cetanu on 09-15-2009 at 02:50 PM
RE: Simple Problem w/ Objects - by matty on 09-15-2009 at 02:58 PM
RE: Simple Problem w/ Objects - by Cetanu on 09-15-2009 at 05:18 PM
RE: Simple Problem w/ Objects - by matty on 09-15-2009 at 05:45 PM
RE: Simple Problem w/ Objects - by Cetanu on 09-15-2009 at 06:02 PM
RE: Simple Problem w/ Objects - by matty on 09-15-2009 at 06:36 PM
RE: Simple Problem w/ Objects - by Cetanu on 09-15-2009 at 08:32 PM
RE: Simple Problem w/ Objects - by CookieRevised on 11-23-2009 at 09:47 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