What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » msgplus windows [RESOLVED]

msgplus windows [RESOLVED]
Author: Message:
Hen
Junior Member
**


Posts: 37
Joined: Aug 2007
O.P. msgplus windows [RESOLVED]
Hi,
I open a window from the chat window using MsgPlus.CreateWnd command.
I have some even from a control button in the window.
Then I want from the window to send a message as a result from this button control.
But if the only parameters of OnWindowIdEvent are "wnd" and "controlID" how can I know to who to send the message?
If I just write SendMessage("test") it doesnt work.
Thanks.


----------

Hi,
I declared a global var, and where I created the window, I also wrote:
flag=ChatWnd
Later, when I had input from control in the window, I did that:
flag.SendMessage("test")
and its working....

This post was edited on 03-30-2008 at 05:07 PM by Hen.
03-30-2008 04:52 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: msgplus windows [RESOLVED]
Excellent that you've found a solution yourself (y)...

But here is a trick question to consider:
What if there are more than one chat windows, and more than one custom window open? How are you going to determine to whom to send the message in that case?


Or a similar question/ thing to consider:
1) Open a chat window
2) From there open the custom window, but don't yet press the button to send a message
3) Open another chat window
4) From there open a second custom window again, but don't yet press the button to send a message
5) Switch back to the first custom window
6) Now press the button in this first custom window to send the message
-> You'll see that the message will be send to the wrong contact



------------

PS: Read the Scripting Documentation carefully for every single function you use. eg: Remember that before you use SendMessage you should always check if you actually can send a message. Especially if the sending will not be done immediatly after recieving a message. This is explained in the Scripting Documentation:
quote:
Originally posted by Scripting Documentation - ChatWnd:: SendMessage
The EditChangeAllowed property should be checked before this function is called.






;)

This post was edited on 03-30-2008 at 06:24 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-30-2008 06:12 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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