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:
texhk
New Member
*


Posts: 6
Joined: Aug 2009
O.P. script for open all contacts window
script for open all contacts window!

please give me a help!
08-25-2009 05:25 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: script for open all contacts window
To open chat windows? That is a very dangerous and memory intensive operation... nonetheless...

js code:
for ( var oContact = new Enumerator ( Messenger.MyContacts ); !oContact.atEnd(); oContact.moveNext() ) {
    Messenger.OpenChat ( oContact.item() );
}
08-25-2009 05:49 PM
Profile E-Mail PM Find Quote Report
texhk
New Member
*


Posts: 6
Joined: Aug 2009
O.P. RE: script for open all contacts window
thz for reply! I'm a newbie in scripting, can you teach me how to put these into a .plsc file? or how can make it works?

This post was edited on 08-26-2009 at 12:43 AM by texhk.
08-26-2009 12:33 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: script for open all contacts window
Dempsey's reply to Pack the script
08-26-2009 02:12 AM
Profile E-Mail PM Find Quote Report
texhk
New Member
*


Posts: 6
Joined: Aug 2009
O.P. RE: RE: script for open all contacts window
quote:
Originally posted by matty
Dempsey's reply to Pack the script

thz a lot!!!(Y)(Y)(Y)
08-26-2009 02:17 AM
Profile E-Mail PM Find Quote Report
texhk
New Member
*


Posts: 6
Joined: Aug 2009
O.P. RE: script for open all contacts window
i already try the script but it only open some of my contacts, around 20 out of 40, and i also try another script to open offline contacts but it's not work..... could you please give me a help? thank you so much!


for offline contacts: (not work, the result is just same as "STATUS_OFFLINE")
============================================
for ( var oContact = new Enumerator(Messenger.MyContacts); !oContact.atEnd(); oContact.moveNext() ) {
     if ( oContact.item().Status > STATUS_ONLINE && oContact.item().Blocked === false ) {
        Messenger.OpenChat( oContact.item() ).OpenChat;
    }
}
============================================
08-27-2009 12:14 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: script for open all contacts window
quote:
Originally posted by texhk
Messenger.OpenChat( oContact.item() ).OpenChat;
This is not valid...
08-27-2009 01:05 AM
Profile E-Mail PM Find Quote Report
texhk
New Member
*


Posts: 6
Joined: Aug 2009
O.P. RE: script for open all contacts window
=====================
for ( var oContact = new Enumerator ( Messenger.MyContacts ); !oContact.atEnd(); oContact.moveNext() ) {
    Messenger.OpenChat ( oContact.item() );
}
=====================

but for open online contacts, these only can open half of online contacts.
08-27-2009 01:49 AM
Profile E-Mail PM Find Quote Report
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 »


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