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:
t0mmy9
New Member
*

Avatar

Posts: 6
Joined: Jul 2006
O.P. send a basic message
hi, ive made half a script and need some help.
ive made the script say something to any user who types "hello" but i want it to type something else, lets say "busy" to any other contacts i am talking to once hello is typed by one of them. I know this is a basic language so this might not be possible but any help is appreciated. thanks.
i assume this is hard to do as i havent had a reply in a while
07-30-2006 06:31 PM
Profile E-Mail PM Web Find Quote Report
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 don't really understand what your trying to do?

When someone says hello, you want the script to say hello back to that user and say busy in all the other open convo's?
[Image: 1-0.png]
             
07-30-2006 09:00 PM
Profile PM Web Find Quote Report
Squelettor
Junior Member
**

Avatar

Posts: 49
Joined: Jul 2006
RE: send a basic message
I don't have understand what do you want..make a example
07-30-2006 09:02 PM
Profile PM Find Quote Report
t0mmy9
New Member
*

Avatar

Posts: 6
Joined: Jul 2006
O.P. RE: send a basic message
"When someone says hello, you want the script to say hello back to that user and say busy in all the other open convo's?"

yes thats it, sorry i didn't explain it that well. say i have 3 windows open and this script busy. person1 person2 person3.
person1 types hello, the bot replys with hi, this i can do but then tells person 2 and person 3 im busy. understand me?

upon looking at all the commands available im not too sure if this is possible. ill still keep looking

This post was edited on 07-31-2006 at 09:33 AM by WDZ.
07-30-2006 10:48 PM
Profile E-Mail PM Web Find Quote Report
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
t0mmy9
New Member
*

Avatar

Posts: 6
Joined: Jul 2006
O.P. RE: send a basic message
ok sorry about that, thanks a lot, impressive script i dont think i would have been able to manage that on my own. thanks.

Edit:sorry i have added it to my script and it is failing to work. I assume someone else either had to type hi,hey or hey! my friend try them all and they all didn't work. i think i will just abort this idea my scripts getting too complicated.

edit again: sorry it does work i just changed a bit of it, thanks a lot for your help :D

This post was edited on 07-31-2006 at 12:12 PM by t0mmy9.
07-31-2006 09:31 AM
Profile E-Mail PM Web Find Quote Report
« 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