Excellent that you've found a solution yourself
...
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.