Getting started - 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: Getting started (/showthread.php?tid=86600) Getting started by Jonte135 on 10-12-2008 at 02:41 PM
I've downloaded the Scripting Documentation and read until "Your first script". What's the next step? It doesn't really explain much more after that RE: Getting started by Matti on 10-18-2008 at 06:57 PM
When you finished reading the Getting Started section, you're ready to pick up an idea and make it a Plus! Live script. RE: Getting started by Jonte135 on 10-18-2008 at 07:03 PM Ahh ok thanks, well I already have an idea which is a simple bot that will answer on questions etc. For example if someone says "hi" to me it will answer back. How to do that is the problem though RE: Getting started by Matti on 10-18-2008 at 09:28 PM
Well, the idea you have comes with a variety of possible problems. code:but that won't match "Hi" or "HI". Also, you might want to avoid matching "hitch" as well. That's where regular expressions can come in handy, such as: code:However, that may already be quite advanced, so maybe you should first learn about those when you plan to do it really good. But your basic concept may look like: code:A good trick to get around the first problem is by using a timer of 1 second when a message is sent by you. That will set a global variable (such as bDoNotRespond) to true. Then, when the timer runs out, you set it back to false. You can now check in the receive message event first if bDoNotRespond is true, and then cancel the timer and return immediately to prevent responding to your own messages. That way, you don't need to use all kinds of workarounds to match Origin against the right contact name. (Think about custom nicknames, StuffPlug's timestamps,...) Anyway, I'm sure there are a lot of threads here which may help you with this. Good luck! RE: Getting started by Jonte135 on 10-18-2008 at 10:11 PM Thanks a lot! I have thread that I made, click here, and I will be going from there to make the rest |