[Request] Custom Contact List Title |
Author: |
Message: |
Knucks
Full Member
Posts: 118 Reputation: 9
34 / /
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:
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 7186 days, 6 hours, 33 seconds ago...
|
|
01-11-2009 05:13 PM |
|
|
warmth
Veteran Member
Electronic Engineer
Posts: 1730 Reputation: 26
39 / /
Joined: Jul 2003
|
RE: [Request] Custom Contact List Title
that is more a suggestion for patch in the beta forums that for here 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 |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 I think...
It isn't that hard to do... simple with a script.
js 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 |
|
|
Knucks
Full Member
Posts: 118 Reputation: 9
34 / /
Joined: Mar 2005
|
O.P. RE: [Request] Custom Contact List Title
quote: Originally posted by matty
js 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 7186 days, 6 hours, 33 seconds ago...
|
|
01-11-2009 06:22 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: [Request] Custom Contact List Title
js 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 |
|
|
Knucks
Full Member
Posts: 118 Reputation: 9
34 / /
Joined: Mar 2005
|
O.P. RE: [Request] Custom Contact List Title
Haha, no problem, I appreciate your help.
Working perfectly
However, I do have one additional request 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?
This post was edited on 01-11-2009 at 06:41 PM by Knucks.
It all happened 7186 days, 6 hours, 33 seconds ago...
|
|
01-11-2009 06:40 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
RE: [Request] Custom Contact List Title
js 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 |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: [Request] Custom Contact List Title
js 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 |
|
|
Knucks
Full Member
Posts: 118 Reputation: 9
34 / /
Joined: Mar 2005
|
O.P. RE: [Request] Custom Contact List Title
Thanks guys Muchly appreciated
I recommend this for people who use Polygamy
It all happened 7186 days, 6 hours, 33 seconds ago...
|
|
01-11-2009 07:22 PM |
|
|
warmth
Veteran Member
Electronic Engineer
Posts: 1730 Reputation: 26
39 / /
Joined: Jul 2003
|
RE: RE: [Request] Custom Contact List Title
quote: Originally posted by matty
js 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 |
|
|
|