Sending messages to a specific chat window works as follows:
code:
wndSomeChat.SendMessage("Hi there. :)");
You won't need the ChatWnd.Handle property to send a message.
You may store the chat window object to send a message to this specific window later in the script, such as:
code:
var wndChatWindow;
function someFunctionRunsFirst() {
wndChatWindow = objChatWnd; // local variable objChatWnd comes from anywhere
}
// ...
function someFunctionRunsLater() {
// now we decide to send a message to the window we have stored
if(wndChatWindow) {
wndChatWindow.SendMessage("Hi there...");
}
}