quote:
Originally posted by -!Felu!-
contacts = new Array("name@domain.com", "name2@doamin.com")//edit these to
function OnEvent_Signin(Email){
for(i=0; i<contacts.length; i++){
if(Email == contacts[i]){
Messenger.OpenChat(Email)
ChatWnd.SendMessage("Good Morning")
}
}
}
Can I ask where the ChatWnd is being defined?
code:
contacts = new Array("name@domain.com", "name2@doamin.com")//edit these to
function OnEvent_ContactSignin(Email){//Said someone else signs in, not him
for(i in contacts){//easier for loop
if(Email == contacts[i]){
var chat = Messenger.OpenChat(Email)//Assign the ChatWnd to a variable
chat.SendMessage("Good Morning")]//Send Message
//chat.SendMessage("/close")
//Optional to close window after saying hello
}
}
}
This method is a bit impractical as it qequires you to edit the script when you want to add somebody