What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] send message to all online contacts

Pages: (2): « First « 1 [ 2 ] Last »
[request] send message to all online contacts
Author: Message:
upsfeup
Junior Member
**


Posts: 67
Joined: Feb 2005
RE: [request] send message to all online contacts
!!! You have to register it in the XML! ScriptInfo.xml

the way to not use the command is to change the first letter to ! instead of /

It will work the same, but it won't appear in the command list when you type "/"
06-29-2006 10:40 PM
Profile E-Mail PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: [request] send message to all online contacts
quote:
Originally posted by ombadboy
the command you entered is not correct..
quote:
Originally posted by upsfeup
!!! You have to register it in the XML! ScriptInfo.xml

the way to not use the command is to change the first letter to ! instead of /

It will work the same, but it won't appear in the command list when you type "/"
:-/ you dont have to register it in ScriptInfo.xml just change mattys code like



quote:
Originally posted by Matty

code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
    if (sMessage.substring(0, 6) == '/imall'){
        var NewMessage = sMessage.substr(7);
        var ChatWnd;
        for(var enumerator = new Enumerator(Messenger.MyContacts) ; !enumerator.atEnd(); enumerator.moveNext()){
            var Contact = enumerator.item();
            if (Contact.Status != 1){
                ChatWnd = Contact.OpenChat(Contact.Email);
                ChatWnd.SendMessage(NewMessage);
                Interop.Call('user32', 'SendMessageW', ChatWnd.Handle, 0x10, 0, 0);
                return '';
            }
        }
    }
}


This post was edited on 06-29-2006 at 10:45 PM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
06-29-2006 10:44 PM
Profile PM Web Find Quote Report
upsfeup
Junior Member
**


Posts: 67
Joined: Feb 2005
RE: [request] send message to all online contacts
Your right! I forgot abou that detail!
06-29-2006 10:50 PM
Profile E-Mail PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: [request] send message to all online contacts
Shouldn't this line
code:
ChatWnd = Contact.OpenChat(Contact.Email);
be
code:
ChatWnd = Messenger.OpenChat(Contact);
?

That is the only OpenChat function I can find in the documentation, Contact doesn't have one.

That would make the whole script
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
    if (sMessage.substring(0, 6) == '/imall'){
        var NewMessage = sMessage.substr(7);
        var ChatWnd;
        for(var enumerator = new Enumerator(Messenger.MyContacts) ; !enumerator.atEnd(); enumerator.moveNext()){
            var Contact = enumerator.item();
            if (Contact.Status != 1){
                ChatWnd = Messenger.OpenChat(Contact);
                ChatWnd.SendMessage(NewMessage);
                Interop.Call('user32', 'SendMessageW', ChatWnd.Handle, 0x10, 0, 0);
                return '';
            }
        }
    }
}


It is a good script though, I was going to write something like this myself eventually, but now I don't have to!

This post was edited on 06-30-2006 at 01:25 AM by The Brain.
06-30-2006 01:24 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] send message to all online contacts
Ya I would have caught the error if I was at home working on it and not at work. I don't have access to either Live or MSN so its hard to debug the code I write at work and post.

But you are correct with the final script.
06-30-2006 06:04 AM
Profile E-Mail PM Find Quote Report
ombadboy
Junior Member
**


Posts: 30
Joined: Jun 2006
O.P. RE: [request] send message to all online contacts
ure sure its workin? cuz its not quite working here..

it opens a window for a very small amount of time i cant notice, but it doesnt actually send what i type

edit: it seems only a portion of my contacts received the msg.. not all
06-30-2006 08:46 AM
Profile PM Find Quote Report
ombadboy
Junior Member
**


Posts: 30
Joined: Jun 2006
O.P. RE: [request] send message to all online contacts
bump.. can some1 help out? doesnt work..
07-05-2006 09:20 PM
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