Scripting: OnEvent_ChatWndSendMessage not fired correctly - 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: WLM Plus! Bug Reports (/forumdisplay.php?fid=7) +----- Thread: Scripting: OnEvent_ChatWndSendMessage not fired correctly (/showthread.php?tid=70404) Scripting: OnEvent_ChatWndSendMessage not fired correctly by Choli on 01-07-2007 at 02:43 AM
hi, RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by deAd on 01-07-2007 at 03:13 AM
Yeah, definitely a bug! A workaround would be to check if the keys are down when the event is fired, but it's not the best way to do it. quote:That's because in order to preserve custom emoticon usage, Plus! just changes the text to whatever you return (it also sends text by adding it to the input box and simulating input to send it). RE: RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by CookieRevised on 01-07-2007 at 04:34 AM
quote:That's not what Choli means though, he just describes the setting up for the bug to happen. The important part, and the description of the bug, is: quote: RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by Matti on 01-07-2007 at 10:03 AM Hmm... I never knew you could use Shift + Send / Ctrl + Send, but I could perfectly reproduce this bug. I hope Patchou will take a look here, since it is a major bug IMHO. RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by Choli on 01-07-2007 at 12:57 PM
quote:nah, that's just a side effect... the important thing is that OnEvent_ChatWndSendMessage is called when a message has not been sent. quote:ah, ok... (this is also a curiosity, not the real bug) RE: RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by CookieRevised on 01-07-2007 at 05:00 PM
quote:which shouldn't happen. The new line should be at the end... ------------------ Dead's reply is about quote:Which I replied upon by saying that quote:is the description/reproduction of quote: ------------------ To say it in another way: Dead only replied to your observation that Plus! (correctly) replaces the text with the returned string. But the important bit in your first post in that paragraph is the very last part that Plus! does not insert the new line properly. RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by Choli on 01-07-2007 at 06:16 PM
quote:it is not Plus who inserts the new line, it's Messenger. And Messenger insserts it where the cursor is at that moment. If Plus deletes the old text, calls OnEvent_ChatWndSendMessage and puts the returned string in the edit area again, then the cursor is placed at the begining, where messenger inserts the new line quote:of course, but it's a side efect, because if Plus didnt call OnEvent_ChatWndSendMessage, the new line will be placed correctly. I said it's a side effect because of that Anyway, let's hope patchou reads and fixes all this (at the end we're talking about the same thing) RE: RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by CookieRevised on 01-08-2007 at 11:48 PM
quote:Are you sure Plus! clears the text area before OnEvent_ChatWndSendMessage is called? That seems strange... since Plus! can't know if the text is going to be parsed or not. If text is not going to be parsed, Plus! will intercept the push on the send button and fires ChatWndSendMessage event and a new line is added after the existing text. Or ... a new line is added after the existing text and Plus! fires a ChatWndSendMessage event. Either way, line is added after the text. If text is going to be parsed, Plus! will intercept the push on the send button and fires ChatWndSendMessage event, text is replaced (and cursor should be at the end in this case) and a new line is added after the existing text. Or ... a new line is added after the existing text and Plus! fires a ChatWndSendMessage event and the existing text is replaced (doubt this is how it works). Either way, line is added after the text. Where did I screw up? (note: didn't tested anything of this... I'm lazy atm ) quote:very true... but I wanna know the -why- RE: Scripting: OnEvent_ChatWndSendMessage not fired correctly by Choli on 01-10-2007 at 08:26 PM
quote:it doesn't matter if plus is going to replace text or not... the thing is that unless you do explicitly, when you put text in an edit box, the cursor possition is at the begining of the text. (with "you put" i mean "a program puts"). The possition is moved when the user pushes keys and types, not when Plus sets the texts of the edit box. And that's done before executing Messenger's code of the button (which Plus always thinks it's going to send the message). That's why when Plus finishes its work, it lets Messenger execut tis code, which in this case is to insert a new line at the possition, which is the begining because Plus (unconsciously) changed it. |