What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Custom Contact List Title

[Request] Custom Contact List Title
Author: Message:
Knucks
Full Member
***

Avatar

Posts: 118
Reputation: 9
33 / Male / Flag
Joined: Mar 2005
O.P. [Request] Custom Contact List Title
I have been using polygamy for a while now and was wondering if it is possible to change the contact list title bar text to determine the right account for the right contact list.

For example:
[Image: WindowClippings_26234.png]

Instead of them both being "Windows Live Messenger":
Left: "Account1"
Right: "Account2"

This way it will be obvious for people using polygamy to see what contact list is the correct one.
Is it possible with a script?
It all happened 6983 days, 9 hours, 30 minutes, 57 seconds ago... :D
01-11-2009 05:13 PM
Profile E-Mail PM Web Find Quote Report
warmth
Veteran Member
*****

Avatar
Electronic Engineer

Posts: 1730
Reputation: 26
39 / Male / Flag
Joined: Jul 2003
RE: [Request] Custom Contact List Title
that is more a suggestion for patch in the beta forums that for here :P I think...
@warmth - Beta Testing a life!
Official Nokia (former Ovi) Suite Beta Tester | Nokia Beta Labs Contributor of the month (June, 2011)
01-11-2009 05:20 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Custom Contact List Title
quote:
Originally posted by warmth
that is more a suggestion for patch in the beta forums that for here :P I think...
It isn't that hard to do... simple with a script.

Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ChatListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ChatListWndCreated(); }
function OnEvent_ChatListWndCreated() {
    if (Messenger.ContactListWndHandle === 0) return;
    var lpsz = Interop.Allocate(2*Messenger.MyEmail.length+2);
    lpsz.WriteString(0, Messenger.MyEmail);
    Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}


This post was edited on 01-11-2009 at 05:41 PM by matty.
01-11-2009 05:39 PM
Profile E-Mail PM Find Quote Report
Knucks
Full Member
***

Avatar

Posts: 118
Reputation: 9
33 / Male / Flag
Joined: Mar 2005
O.P. RE: [Request] Custom Contact List Title
quote:
Originally posted by matty

Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ChatListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ChatListWndCreated(); }
function OnEvent_ChatListWndCreated() {
    if (Messenger.ContactListWndHandle === 0) return;
    var lpsz = Interop.Allocate(2*Messenger.MyEmail.length+2);
    lpsz.WriteString(0, Messenger.MyEmail);
    Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}


Thanks for your help, but for some reason the title text only changes when the account is signed into. If the contact list for that account is closed and then reopened, the text no longer changes.
It all happened 6983 days, 9 hours, 30 minutes, 57 seconds ago... :D
01-11-2009 06:22 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Custom Contact List Title
Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ContactListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ContactListWndCreated(); }
function OnEvent_ContactListWndCreated() {
    if (Messenger.ContactListWndHandle === 0) return;
    var lpsz = Interop.Allocate(2*Messenger.MyEmail.length+2);
    lpsz.WriteString(0, Messenger.MyEmail);
    Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}


Wow I screwed that one up HUGE!

I had ChatListWndCreated not ContactListWndCreated...

This post was edited on 01-11-2009 at 06:31 PM by matty.
01-11-2009 06:30 PM
Profile E-Mail PM Find Quote Report
Knucks
Full Member
***

Avatar

Posts: 118
Reputation: 9
33 / Male / Flag
Joined: Mar 2005
O.P. RE: [Request] Custom Contact List Title
Haha, no problem, I appreciate your help.
Working perfectly :D

However, I do have one additional request :P Since every account is different, I was wondering if a "check" could be done to see what email it is and change the contact list title text relevant to the email.

I'm not sure how this is done in .js but something like this:

if (email == blah@live.com) return "Account1"
else if (email == moreblah@live.com) return "Account2"

Any ideas? :P

This post was edited on 01-11-2009 at 06:41 PM by Knucks.
It all happened 6983 days, 9 hours, 30 minutes, 57 seconds ago... :D
01-11-2009 06:40 PM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: [Request] Custom Contact List Title
Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ContactListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ContactListWndCreated(); }
function OnEvent_ContactListWndCreated() {
    if (Messenger.ContactListWndHandle === 0) return;
    var title = getTitle();
    var lpsz = Interop.Allocate(2*title.length+2);
    lpsz.WriteString(0, title);
    Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}
 
function getTitle(){
    if(Messenger.MyEmail == "blah@live.com") return "Account 1";
    else if(Messenger.MyEmail == "moreblah@live.com") return "Account 2";
    else return "Your WLM has been hacked!";
}

01-11-2009 07:11 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Custom Contact List Title
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!
01-11-2009 07:11 PM
Profile E-Mail PM Find Quote Report
Knucks
Full Member
***

Avatar

Posts: 118
Reputation: 9
33 / Male / Flag
Joined: Mar 2005
O.P. RE: [Request] Custom Contact List Title
Thanks guys :D Muchly appreciated :)
I recommend this for people who use Polygamy :P
It all happened 6983 days, 9 hours, 30 minutes, 57 seconds ago... :D
01-11-2009 07:22 PM
Profile E-Mail PM Web Find Quote Report
warmth
Veteran Member
*****

Avatar
Electronic Engineer

Posts: 1730
Reputation: 26
39 / Male / Flag
Joined: Jul 2003
RE: RE: [Request] Custom Contact List Title
quote:
Originally posted by matty
Javascript code:
function OnEvent_Initialize(bMessengerStart) { OnEvent_ContactListWndCreated(); }
function OnEvent_SigninReady(sEmail) { OnEvent_ContactListWndCreated(); }
function OnEvent_ContactListWndCreated() {
    if (Messenger.ContactListWndHandle === 0) return;
    var lpsz = Interop.Allocate(2*Messenger.MyEmail.length+2);
    lpsz.WriteString(0, Messenger.MyEmail);
    Interop.Call('user32', 'SendMessageW', Messenger.ContactListWndHandle, 0xC /* WM_SETTEXT */, 0, lpsz.DataPtr);
}


Wow I screwed that one up HUGE!

I had ChatListWndCreated not ContactListWndCreated...
for some reason always worked great but now is saying:

code:
El script está iniciándose
El script está cargado y listo
Función llamada: OnEvent_Initialize
Función llamada: OnEvent_ContactListWndCreated
Error: No es válido en el nivel superior del documento.
(código: -2147418113).
       Archivo: main.js. Línea: 5.
La función OnEvent_ContactListWndCreated devolvió un error. Código: -2147352567
Función llamada: OnEvent_SigninReady
Función llamada: OnEvent_ContactListWndCreated
Función llamada: OnEvent_ContactListWndCreated
@warmth - Beta Testing a life!
Official Nokia (former Ovi) Suite Beta Tester | Nokia Beta Labs Contributor of the month (June, 2011)
01-27-2009 12:06 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On