Shoutbox

StuffPlug Auto-Talker - 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)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: StuffPlug Auto-Talker (/showthread.php?tid=48421)

StuffPlug Auto-Talker by TrickZ on 08-02-2005 at 11:41 PM

I'm not sure if this is the correct place to be asking this but...

Does anyone know how to make a script for an auto-talker for StuffPlug that would capitalise the first letter of every word.. So for example 'I Would Be Talking Like This'?

Let me know,

Thanks


RE: StuffPlug Auto-Talker by RaceProUK on 08-03-2005 at 05:02 PM

You'll need to learn either VBScript or JavaScript, then look at the files for the provided talkers. Then you should have enough info to write one ;)


RE: StuffPlug Auto-Talker by Lou on 08-03-2005 at 05:07 PM

if you need anymore help see the stuffplug forums at stuffplug.com :D


RE: StuffPlug Auto-Talker by TrickZ on 08-03-2005 at 05:12 PM

Hmm.. I was just wondering whether anyone knew JavaScript or VBScript already who could do it for me.. I mean, wouldn't learning either one of those languages take a long time?


RE: StuffPlug Auto-Talker by RaceProUK on 08-03-2005 at 05:13 PM

Not that long really. The amount you'd need to learn would take you about half an hour.


RE: StuffPlug Auto-Talker by TrickZ on 08-03-2005 at 05:15 PM

Oh, alright then, I'll have a look around.. Can you recommend any good tutorials or sites?


RE: StuffPlug Auto-Talker by TrickZ on 08-03-2005 at 05:21 PM

I just searched google and found this:

http://www.irt.org/script/531.htm

Will that do what I'm looking for?

Let me know

Thanks


RE: StuffPlug Auto-Talker by RaceProUK on 08-04-2005 at 03:52 PM

quote:
Originally posted by TrickZ
I just searched google and found this:

http://www.irt.org/script/531.htm

Will that do what I'm looking for?

Let me know

Thanks
It's certainly a good place to start ;) Now all you need to do is take that JavaScript and make it into a talker.
RE: StuffPlug Auto-Talker by TrickZ on 08-04-2005 at 03:55 PM

Yeah, I've tried all that but I keep getting the same error.. The thing is, I don't know how to take that script and alter/adapt it so that it works with StuffPlug.. I would be really grateful if anyone could lend me a hand :)


RE: StuffPlug Auto-Talker by RaceProUK on 08-04-2005 at 03:57 PM

code:
function talker(a) {
    var pattern = /(\w)(\w*)/; // a letter, and then one, none or more letters

    for (i = 0 ; i < a.length ; i ++ ) {
        var parts = a[i].match(pattern); // just a temp variable to store the fragments in.

        var firstLetter = parts[1].toUpperCase();
        var restOfWord = parts[2].toLowerCase();

        a[i] = firstLetter + restOfWord; // re-assign it back to the array and move on
    }
   
    document.form1.text1.value = a.join(' '); // join it back together
}
Should work well ;) Just save in a file called 'talker.name.js' and put it with the other talkers.
RE: StuffPlug Auto-Talker by TrickZ on 08-04-2005 at 03:59 PM

Thanks a lot :) I'll try that now and let you know if it's worked or not


RE: StuffPlug Auto-Talker by TrickZ on 08-04-2005 at 04:03 PM

Argh...