quote:
Originally posted by Samo502
quote:
Originally posted by CookieRevised
Also, before using the SendMessage function you should test if you actually can send a string back because it is not always possible
Meaning?
Scripting Docs > Index > ChatWnd:: SendMessage tells you:
quote:
Remarks:
If the text being set is longer than the maximum allowed (typically 1100 characters), it is truncated. If the typing area already contains text when this function is called, it is saved before the message is sent and automatically restored after that. The EditChangeAllowed property should be checked before this function is called.
Thus:
jscript code:
if (ChatWnd.EditChangeAllowed) {
ChatWnd.SendMessage("[N]" + Contact.Name + " is " + status + "[/N]")
}
quote:
Originally posted by Samo502
It had no need being there since there is no enumeration for 2, it skips it in the statuslist.
true, but for completeness sake (and maybe for futur compatibility) you can put it there (just as I showed in the example code, only 1 extra line).
Note that there actually is an enumeration constant for that. See Scripting Docs > Index > Messenger:MyStatus:
quote:
STATUS_INVISIBLE (2)