Shoutbox

[Help] Auto Talking Script - 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: [Help] Auto Talking Script (/showthread.php?tid=75244)

[Help] Auto Talking Script by makeshift on 06-10-2007 at 07:37 PM

Hi,

I'm new to scripting in MSN, and have only just got through the tutorial, so far i've been wanting to make a very simple Auto Talker, example:

quote:
Bob: How are you?
Me: (Auto Talker) Alright, you?


I've been playing with a script that can supposedly do this, and can be changed and edited very quickly to do it, it's the Auto Nothing 1.1 Beta ( No, i wasn't going to just edit a couple of things and release it, i was just using it as a learning experiance).

While testing the Auto Nothing, i found that when my friends type to me while i'm working ( Like if they say wuu2 ), it doesn't automaticly reply, even when it's turned on, and it's scripting says it should, so, as that isn't working for me, could anybody please quickly nip up a script for me which will do as i would like, with maybe toasts for when it's on and off, and a menu for "Is Auto Talker on/off?" which will tell you if it's on/off, and another bit in there for "Turn On/Turn Off".

I know i'm irritating and you'll probably flame me, but i would like help, and you will get credits, thankyou.
RE: [Help] Auto Talking Script by Jimbo on 06-10-2007 at 07:41 PM

Have a look at this


RE: [Help] Auto Talking Script by makeshift on 06-10-2007 at 08:16 PM

Hmmm, thankyou :), that is what i would like to make in the future, but currently that's too hard for me to edit, all i need is a VERY simple script.


RE: [Help] Auto Talking Script by Volv on 06-11-2007 at 05:31 AM

Hi makeshift, it's good to hear that people are genuinely interested in learning how to script something from start to finish.

For a really simple script which does this you first need to use the OnEvent_ChatWndReceiveMessage event which is documented in the Scripts Documentation. This "event is fired when a new message is received in a chat window" and provides you with among a variety of other things (see scripting docs), the message which was received:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {

    //Firstly, this event function is triggered when any message is added to the conversation including ones which we send to others, so we need to make sure that the person who sent this message wasn't us (note that Origin is one of the parameters which was passed to this function and contains the Nickname of the contact which sent the message)
    if(Origin != Messenger.MyName) {

        //The person who sent the message wasn't me, now you need to check if the message is the message which we are looking for
        if(Message == "How are you?") {

            //The contact has typed the message we're looking for so we need to reply!
            ChatWnd.SendMessage("Alright, you?");

        }
    }
}

RE: [Help] Auto Talking Script by makeshift on 06-12-2007 at 03:47 PM

Brilliant, thanks!


RE: [Help] Auto Talking Script by jollyscripts on 08-14-2007 at 12:42 PM

thanks for the script,

i wondered if there is a way to write it for multiple messages

i tried..

(Message == "hi","hello")

but that makes the script have an error, any hep?


RE: RE: [Help] Auto Talking Script by Jona on 08-31-2007 at 02:19 PM

quote:
Originally posted by jollyscripts
thanks for the script,

i wondered if there is a way to write it for multiple messages

i tried..

(Message == "hi","hello")

but that makes the script have an error, any hep?

I'm also a newbie in scripting but I figured this out :P

(Message="hi" || Message="hello")