What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » auto messaging

auto messaging
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: auto messaging
Sorry, but I have to note that Origin is the name of the user sending the message, and thus is not the e-mail address of the person. Therefore, you'd need to loop through the conversation contacts looking for the Origin, like this:
code:
//number of times to send message
var times = 2; //Why do you make this a string and force JScript to convert it to a number each time?

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message)
{
    if (Origin != Messenger.MyName)
    {
        //Start contact search
        var sEmail = ""; //Create a variable to store the e-mail in
        //Loop through the contacts in the chat
        for(var e = new Enumerator(ChatWnd.Contacts); !e.atEnd(); e.moveNext)
        {
            //If the contact's name matches the name of the sender...
            if (e.item().Name == Origin)
            {
                sEmail = e.item().Email; //Store the e-mail address
                break; //Exit the loop
            }
        }
        //End contact search
        if(sEmail == "example@hotmail.com")
        {
            if (Message == "hi")
            {
                for(i=0; i<times; i++)
                {
                    ChatWnd.SendMessage("hey, how r u");   
                }     
            }
        }
    }
}
If you mean with "send it a certain amount of times" that you want to set a maximum amount of times the message should be sent, it'll get a bit more complicated. I'll explain that if you really need to know. :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-08-2007 06:24 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
auto messaging - by jollyscripts on 09-07-2007 at 06:55 PM
RE: auto messaging - by davidpolitis on 09-08-2007 at 04:58 PM
RE: auto messaging - by Matti on 09-08-2007 at 06:24 PM
RE: auto messaging - by davidpolitis on 09-08-2007 at 08:58 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