The following should do the job:
code:
//Declare status constants
var statusAppearOffline = 2;
var statusOnline = 3;
var statusBusy = 4;
var statusBeRightBack = 5;
var statusAway = 7;
var statusInACall = 8;
var statusOutToLunch = 9;
function OnEvent_ContactSignin(strEmail) {
switch (strEmail) {
//Set my status to 'Appear Offline' when Bob comes online
case "bob@hotmail.com":
Messenger.MyStatus = statusAppearOffline;
return;
//Set my status to 'Busy' when Jane comes online
case "jane@hotmail.com":
Messenger.MyStatus = statusBusy;
return;
}
}
IMPORTANT: This will only work when you're on Messenger and the contact signs in, not if they're already online when
you sign in.
EDIT: Fixed up something in the code thanks to CookieRevised.