What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » send a basic message

send a basic message
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: send a basic message
I'll try, shouldn't be too hard.

Might take some time, as I have a deadline for next week at work.

EDIT: Found out the script was a lot easier than I thought, so I have a working function already :-)

I'll explain what it does.

First It checks if it was you that sent the message, if not continue, then it look s at the message to see if the message contains Hey, if it does continue (notice: you can change this to any message you like).
Then it send Hi, back to the same conversation where you just received the message, now it starts looping trough all the open conversations and because one conversation should be skipped (the one where we just answered Hi) it checks the Handle of the window, if the handle is not the same it sends "Sorry, i'm busy right now".

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
  if (Origin != Messenger.MyName)
  {
    if (Message.match(/(^|\s+)Hey!?($|\s+)/i) != null)
    {
      ChatWnd.SendMessage("Hi");
      var e = new Enumerator(Messenger.CurrentChats);
      for(; !e.atEnd(); e.moveNext())
      {
        var ChatWindow = e.item();
        if (ChatWindow.Handle != ChatWnd.Handle)
        {
          ChatWindow.SendMessage("Sorry, i'm currently Busy");         
        }
      }
    }
  }
}


Another thing, please don't double post, there is an edit button.

This post was edited on 07-31-2006 at 09:21 AM by Ezra.
[Image: 1-0.png]
             
07-31-2006 08:52 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
send a basic message - by t0mmy9 on 07-30-2006 at 06:31 PM
RE: send a basic message - by Ezra on 07-30-2006 at 09:00 PM
RE: send a basic message - by Squelettor on 07-30-2006 at 09:02 PM
RE: send a basic message - by t0mmy9 on 07-30-2006 at 10:48 PM
RE: send a basic message - by Ezra on 07-31-2006 at 08:52 AM
RE: send a basic message - by t0mmy9 on 07-31-2006 at 09:31 AM


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