matty's example showed how to get the status of a contact when you open the conversation window. But the
status property belongs to the
contact object. This object is always available. So you don't need to first open a conversation window, it can be checked before too. In matty's example you get that
contact object from the contacts who are in the conversation window, but you can just as well get that object from your contact list.
So, all you need to do is get the
contact object from the contact you which to check upon. This can be done by using the
Messenger::MyContacts object, which will give you a
contacts object, which will have a
getcontact method.
Anyways, all this info can be found in the
Scripting documentation.
Go to the index tab and there you have all the object, properties and methods you can use....
var oContacts = Messenger.MyContacts
var oContact = oContacts.GetContact("contact@mail.com")
var eStatus = oContact.Status
PS: also check out the
ChatWnd::EditChangeAllowed property! This property indicates if you actually can send a message or not. It should always be used before
ChatWnd::SendMessage.