Shoutbox

Is there a script that can respond line-by-line... - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Is there a script that can respond line-by-line... (/showthread.php?tid=93393)

Is there a script that can respond line-by-line... by flarngus on 01-01-2010 at 12:50 AM

Instead of having to use certain keywords to generate a response?  Like, for example, Answering Machine Plus without the receive column?  I was wondering if there was such a script that would allow me to automatically respond to the person, line-by-line, with a delayed response, as if it were talking to a real person?  Thanks.


RE: Is there a script that can respond line-by-line... by stoshrocket on 01-17-2010 at 04:13 PM

I doubt there's a script that's out there, but with a little help from the scripting documentation I'm sure it's certainly possible.

You could have a look at how answering machine plus takes messages and checks them for the key words, then write in a simple function that is set in motion when a key word is found...

As for the function to send messages, you could just have an array of messages to send, and use for...in to loop through the array, using a delay between each message. Something like this:

Javascript code:
//check for message sent, check for keyword, if found send_messages()
 
function send_messages(){
  var message_array = ["hey","how are you?"];
  for(var message in message_array){
    setTimeout("SendMessage(message)",1250);
  }
}


PS: If you really don't feel up for it, I might try making the script next week after my exams have finished :P

RE: RE: Is there a script that can respond line-by-line... by flarngus on 01-19-2010 at 08:13 AM

I've tried to learn the official documentation, and, for the life of me, cannot figure it out.  I would appreciate it if you could make a simple script to respond line-by-line, with a delayed response that can handle multiple IM's at a time.  If this can be done, please let me know.  I appreciate any help that can be given to me.  Thank you.