Read the official scripting documentation;
http://www.msgpluslive.net/scripts/browse/index.php?act=view&id=13
It will help you with all of these problems.
code:
OnEvent_ContactSignin(strEmail) {
Messenger.OpenChat(Messenger.MyContacts.GetContact(strEmail)).SendMessage("hello");
}