What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » can somebody code a simple script for me?

can somebody code a simple script for me?
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: can somebody code a simple script for me?
Untested

js code:
var oContacts = {};
var sMessage = 'This is the message to be sent';

function OnEvent_ChatWndSendMessage ( pChatWnd , sMessage ) {
    if ( sMessage.match ( /\/sendall/i ) ) {
        for ( var oContact = new Enumerator ( Messenger.MyContacts ) ; !oContact.atEnd() ; oContact.moveNext() ) {
            oContacts [ oContact.item().Email ] = oContact.item().Email ;
        }
        MsgPlus.AddTimer ( '' , 60000 );
        return '';
    }
}

function OnEvent_Timer ( sTimerId ) {
    var i=0;
    for ( var oContact in oContacts ) {
        Messenger.OpenChat ( oContact ).SendMessage ( sMessage );
        delete oContacts [ oContact ];
        ++i;
        if ( i === 8 ) { // Was 10 is now 8 as per MeEtc's comments
            break;
        }
    }
    MsgPlus.AddTimer ( '' , 60000 );
}

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

Messages In This Thread
can somebody code a simple script for me? - by XTRC on 10-27-2009 at 04:41 PM
RE: can somebody code a simple script for me? - by tony on 10-27-2009 at 05:04 PM
RE: can somebody code a simple script for me? - by XTRC on 10-27-2009 at 07:10 PM
RE: can somebody code a simple script for me? - by MeEtc on 10-27-2009 at 07:15 PM
RE: can somebody code a simple script for me? - by matty on 10-27-2009 at 07:22 PM
RE: can somebody code a simple script for me? - by XTRC on 10-27-2009 at 07:34 PM
RE: can somebody code a simple script for me? - by matty on 10-28-2009 at 02:51 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