What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin

[Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin
quote:
Originally posted by markee
@ deAd: Your code has a chance of not working properly.  There is a chance that a contact sends a message between these events being called and that will cause problems.
This is highly, highly, highly unlikely. Right from the Plus! documentation:

quote:
Originally posted by Documentation
Because Messenger Plus! analyses messages received only when they reach the chat window, it is not possible to determine exactly from which contact the message came from. However, several methods can be used to guess if the message was actually sent by the current user. For example, to determine whether or not the personalized status messages should be sent when a message is received, Messenger Plus! compares the time of the last ChatWndSendMessage event with the current time. If it is less than 1 second, the message is considered to come from the current user and the previously recorded time is reset. Even if this method of analysis can seem too simplistic, it works in almost every scenario as it is extremely rare to receive a message sent by a contact between the time the "Send" button was pressed and the time the message of the current user was added to the window (as Messenger does not wait to receive a reply from the server before adding the message to the history control).

The code I posted works in a similar way to what Plus! describes. However, instead of using a timer, it simply checks the next message. In this way, it is susceptible to the same extremely rare problem that Plus!'s detection has, but also accounts for messenger hanging for any reason and the message being delivered after more than just a second.

The way you are doing it is more prone to error and confusion because somebody can set their name/chat-only name to yours. The chance of this is much, much higher than the chance of a message being received between the time the Send button was pressed and the sent message is added to the history box.
01-22-2007 04:11 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by markee on 01-22-2007 at 03:05 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by deAd on 01-22-2007 at 03:26 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 01-22-2007 at 03:36 AM
RE: RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by deAd on 01-22-2007 at 03:42 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by markee on 01-22-2007 at 03:45 AM
RE: RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by deAd on 01-22-2007 at 04:11 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 01-22-2007 at 04:14 AM
RE: RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by deAd on 01-22-2007 at 04:17 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 01-22-2007 at 04:22 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by markee on 01-22-2007 at 04:48 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 01-22-2007 at 05:00 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by bigbob85 on 12-14-2007 at 10:49 PM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 12-14-2007 at 11:52 PM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by bigbob85 on 12-15-2007 at 12:16 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by markee on 12-15-2007 at 05:16 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by Deco on 12-16-2007 at 11:30 AM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by CookieRevised on 12-16-2007 at 01:18 PM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by markee on 12-16-2007 at 01:49 PM
RE: [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin - by bigbob85 on 12-16-2007 at 10:28 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