What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release/Updated]Polygamy addition: Window Named as email

[Release/Updated]Polygamy addition: Window Named as email
Author: Message:
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. [Release/Updated]Polygamy addition: Window Named as email
Here is a useful script that Matty created. I requested it, and he gave it to me. He's allowed for this thread to be posted:)

What the script does is simple, it renames your contact list windows to the email address running it. Why? Because when running multiple Windows Live Messenger Instances (polygamy), things can get complicated.

[Image: polygamysuggestionxf2.png]


The code is below, as I haven't created a plsc file for it. Please keep all credits in the script.

code:
/*
Code written by Matty
Don't release without this notice, add your own if you really want, but leave this one there
Modify as you want, except for this notice
*/


function OnEvent_SigninReady() {
    _setText();
}

function OnEvent_ContactListWndCreated() {
    _setText();
}

function OnEvent_Initialize(bMessengerStart){
    _setText();
}

function OnEvent_MessengerUnLocked(){
    MsgPlus.AddTimer('settext', 100); // Note #1
}

function OnEvent_Timer(sTimerId){
    _setText();
}

function _setText(){
    if (Messenger.MyStatus > 1 && Messenger.ContactListWndHandle != 0) {
        var _titlesize = Interop.Call('user32', 'GetWindowTextLengthW', Messenger.ContactListWndHandle)+1;
        var _title = Interop.Allocate((2*_titlesize)+2);
        Interop.Call('user32', 'GetWindowTextW', Messenger.ContactListWndHandle, _title, _titlesize);
        Interop.Call('user32', 'SetWindowTextW', Messenger.ContactListWndHandle, Messenger.MyEmail + ' - ' + _title.ReadString(0));
    }
}

/*
Note #1
We do this because for some odd reason the caption is set back to Windows Live Messenger
and our title we set doesn't stay even tho the window is just hidden and shown again.
*/


edit: code updated:)

This post was edited on 01-06-2007 at 02:36 AM by Lou.
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
01-05-2007 05:48 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Polygamy addition: Window Named as email
quote:
Originally posted by .Lou
/*
Note #1
Code written by Matty
Don't release without this notice, add your own if you really want, but leave this one there
Modify as you want, except for this notice
*/
Why is that there, it wasn't in the code lol.
01-05-2007 05:52 AM
Profile E-Mail PM Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
O.P. RE: [Release]Polygamy addition: Window Named as email
quote:
Originally posted by Matty
quote:
Originally posted by .Lou
/*
Note #1
Code written by Matty
Don't release without this notice, add your own if you really want, but leave this one there
Modify as you want, except for this notice
*/
Why is that there, it wasn't in the code lol.
I've no idea, it's fixed now though :P

This post was edited on 01-05-2007 at 05:51 PM by Lou.
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
01-05-2007 05:55 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Release]Polygamy addition: Window Named as email
small update

code:
/*
Code written by Matty
Don't release without this notice, add your own if you really want, but leave this one there
Modify as you want, except for this notice
*/


function OnEvent_SigninReady() {
    _setText();
}

function OnEvent_ContactListWndCreated() {
    _setText();
}

function OnEvent_Initialize(bMessengerStart){
    _setText();
}

function OnEvent_MessengerUnLocked(){
    MsgPlus.AddTimer('settext', 100); // Note #1
}

function OnEvent_Timer(sTimerId){
    _setText();
}

function _setText(){
    if (Messenger.MyStatus > 1 && Messenger.ContactListWndHandle != 0) {
        var _titlesize = Interop.Call('user32', 'GetWindowTextLengthW', Messenger.ContactListWndHandle)+1;
        var _title = Interop.Allocate((2*_titlesize)+2);
        Interop.Call('user32', 'GetWindowTextW', Messenger.ContactListWndHandle, _title, _titlesize);
        Interop.Call('user32', 'SetWindowTextW', Messenger.ContactListWndHandle, Messenger.MyEmail + ' - ' + _title.ReadString(0));
    }
}

/*
Note #1
We do this because for some odd reason the caption is set back to Windows Live Messenger
and our title we set doesn't stay even tho the window is just hidden and shown again.
*/

01-05-2007 10:20 PM
Profile E-Mail PM 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