What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » sending a message to all my contacts

Pages: (2): « First « 1 [ 2 ] Last »
sending a message to all my contacts
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: sending a message to all my contacts
Yeah I just noticed as I was about to close it.

Javascript code:
var oContacts = [];
var Message = 'This is where your message would go.';
 
function OnEvent_Initialize() {
    OnEvent_SigninReady();
}
 
function OnEvent_SigninReady() {
    if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
   
    for (var eContact = new Enumerator(Messenger.MyContacts); !eContact.atEnd(); eContact.moveNext())
        oContacts.push(eContact.item());
    MsgPlus.AddTimer('_Timer', 60000);
 
function OnEvent_Timer(sTimerId) {
    var bSent = true;
    var oChatWnd;
    while (bSent === true && oContacts.length > 0) {
        oChatWnd = Messenger.OpenChat(oContacts[0]);
        if (oChatWnd.EditChangeAllowed === true)
            bSent = oChatWnd.SendMessage(Message);
           
        Interop.Call('user32', 'SendMessageW', oChatWnd.Handle, 0x10 /* WM_CLOSE */, 0)
       
        if (bSent === true) {
            MsgPlus.LogEvent('Notification:', oContacts[0].Name+' has been notified of email change.', EVICON_PLUS);
            oContacts.shift();
        }
        else
            if (oContacts.length > 0)
                MsgPlus.AddTimer(sTimerId, 60000);
    }
}

07-05-2012 03:35 PM
Profile E-Mail PM Find Quote Report
gregrj
Junior Member
**


Posts: 20
Joined: Feb 2011
O.P. RE: sending a message to all my contacts
strange but I got this error :

Erreur : '}' attendu (code : -2146827279)
       Fichier : yahoo2live.js. Ligne : 33.
Démarrage du script

then I add a } to the last line...
error gone, but may be I messed up..
Checking right now.

Anyway Thank You :)
07-05-2012 10:55 PM
Profile E-Mail PM Find Quote Report
gregrj
Junior Member
**


Posts: 20
Joined: Feb 2011
O.P. RE: sending a message to all my contacts
It might work... My contacts are pretty slow...:/
but I don't see any notifications in event viewer
don't know if this part works.

07-06-2012 11:45 AM
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: sending a message to all my contacts
The missing curly bracelet should be added after the first occurrence of "MsgPlus.AddTimer('_Timer', 60000);", not the last line. See if that fixes the problem.

This post was edited on 07-06-2012 at 01:51 PM by Mnjul.
07-06-2012 01:50 PM
Profile PM Web Find Quote Report
gregrj
Junior Member
**


Posts: 20
Joined: Feb 2011
O.P. RE: sending a message to all my contacts
like this ?

Javascript code:
var oContacts = [];
var Message = 'Salut Salut !, je suis en cours de migration sur gregreg94@live.fr , tu es ok pour rajouter cette adresse ? Si tu le fais, fais le moi savoir avec un petit mot stp :) Bises';
 
function OnEvent_Initialize() {
    OnEvent_SigninReady();
}
 
function OnEvent_SigninReady() {
    if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
   
    for (var eContact = new Enumerator(Messenger.MyContacts); !eContact.atEnd(); eContact.moveNext())
        oContacts.push(eContact.item());
    MsgPlus.AddTimer('_Timer', 60000);
}
function OnEvent_Timer(sTimerId) {
    var bSent = true;
    var oChatWnd;
    while (bSent === true && oContacts.length > 0) {
        oChatWnd = Messenger.OpenChat(oContacts[0]);
        if (oChatWnd.EditChangeAllowed === true)
            bSent = oChatWnd.SendMessage(Message);
           
        Interop.Call('user32', 'SendMessageW', oChatWnd.Handle, 0x10 /* WM_CLOSE */, 0)
       
        if (bSent === true) {
            MsgPlus.LogEvent('Notification:', oContacts[0].Name+' has been notified of email change.', EVICON_PLUS);
            oContacts.shift();
        }
        else
            if (oContacts.length > 0)
                MsgPlus.AddTimer(sTimerId, 60000);
    }
}


again thank you for such investissement.
07-06-2012 10:11 PM
Profile E-Mail PM Find Quote Report
gregrj
Junior Member
**


Posts: 20
Joined: Feb 2011
O.P. RE: sending a message to all my contacts
OKaaayy...
Agian, I'm really GRATEFUL for your time and efforts..
but actually, it could be a disaster... ^^

I thik 99,99 of my contacts blocked me because, they all receive multiple message , actually one every 7 minutes for may be all the weekend


*-)


07-09-2012 02:55 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: sending a message to all my contacts
quote:
Originally posted by gregrj
OKaaayy...
Agian, I'm really GRATEFUL for your time and efforts..
but actually, it could be a disaster... ^^

I thik 99,99 of my contacts blocked me because, they all receive multiple message , actually one every 7 minutes for may be all the weekend


*-)
I don't see how that is possible unless you were signed out and back in a bunch of times. The idea was that you run and then disable the script.
07-10-2012 12:24 PM
Profile E-Mail PM Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: sending a message to all my contacts
I'm surprised there's anyone left who still wrongly uses Hungarian notation.
The previous sentence is false. The following sentence is true.
07-14-2012 09:26 AM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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