quote:
Originally posted by Jacen
code:
function OnEvent_MenuClicked(sMenuId){
*snip*
if(sMenuId=="mnuItem7"){
*snip*
ChatWnd.SendMessage("Test");
}
}
You will have to add all parameters for OnEvent_MenuClicked, not just sMenuId. There is one called OriginWnd, which is the ChatWnd object.
Code:
code:
function OnEvent_MenuClicked(sMenuId, Location, OriginWnd){
*snip*
if(sMenuId=="mnuItem7"){
*snip*
if(Location == 2){ // we are in chat window, not in contact list
OriginWnd.SendMessage("Test");
}
}
}
Changes are made in bold.