Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ContactListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ContactListWndCreated(); }
function OnEvent_ContactListWndCreated() {
if (Messenger.ContactListWndHandle === 0) return;
var str;
switch (Messenger.MyEmail) {
case 'johndoe@hotmail.com':
str = 'Account 1';
break;
case 'johndoe@live.com':
str = 'Account 2';
break;
default:
str = Messenger.MyEmail;
break
}
var lpsz = Interop.Allocate(2*str.length+2);
lpsz.WriteString(0, str);
Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}
However you would think that email addresses would be easier!