What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » script for open all contacts window

script for open all contacts window
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: script for open all contacts window
Like I said it is a memory intensive task. I would recommend doing something like this:

js code:
// create an array to hold the contact objects
var objContacts = new Array();

function OnEvent_Initialize ( ) {
    // verify user is logged on before doing anything
    if ( Messenger.MyStatus < STATUS_INVISIBLE ) return;
    // enumerate all contacts on the list
    for ( var oContact = new Enumerator ( Messenger.MyContacts ); !oContact.atEnd ( ); oContact.moveNext ( ) ) {
        // save all contacts to an array
        objContacts.push ( oContact.item ( ) );
    }
    // create a timer to open the contacts
    MsgPlus.AddTimer ( 'OpenContacts' , 250 );
}

function OnEvent_SigninReady ( ) {
    OnEvent_Initialize ( );
}

function OnEvent_Timer ( sTimer ) {
    // open the chat window for the contact and remove them from the array
    // The shift() method is used to remove and return the first element of an array.
    Messenger.OpenChat ( objContacts.shift ( ) );
    // check if there are any more contacts left to open chat windows for if so keep the timer going
    if ( objContacts.length > 0 ) MsgPlus.AddTimer ( sTimer , 250 );
}

This post was edited on 08-27-2009 at 12:54 PM by matty.
08-27-2009 12:52 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
script for open all contacts window - by texhk on 08-25-2009 at 05:25 PM
RE: script for open all contacts window - by matty on 08-25-2009 at 05:49 PM
RE: script for open all contacts window - by texhk on 08-26-2009 at 12:33 AM
RE: script for open all contacts window - by matty on 08-26-2009 at 02:12 AM
RE: RE: script for open all contacts window - by texhk on 08-26-2009 at 02:17 AM
RE: script for open all contacts window - by texhk on 08-27-2009 at 12:14 AM
RE: script for open all contacts window - by matty on 08-27-2009 at 01:05 AM
RE: script for open all contacts window - by texhk on 08-27-2009 at 01:49 AM
RE: script for open all contacts window - by matty on 08-27-2009 at 12:52 PM


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