O.P.    Get Contacts in a chat
Hi  
I am trying to get the name of a contact who I am trying to start a conversation with or who is trying to start a new conversation with me. So I added code to the function OnEvent_ChatWndCreated(ChatWnd) event 
I am new to scripting so can anyone please provide me with a code snippet. I have written this 
 
function OnEvent_ChatWndCreated(ChatWnd) 
{ 
    m = ChatWnd.Contacts[1]; 
    alert(m.Name); 
     
} 
 
but it says 
 
Script is starting 
Script is now loaded and ready 
Function called: OnEvent_Initialize 
Function called: OnEvent_ChatWndCreated 
Error: 'm.Name' is null or not an object (code: -2146823281) 
       File: warn.js. Line: 13. 
Function OnEvent_ChatWndCreated returned an error. Code: -2147352567 
 
Thanks 
 |