[SOLVED] How do I create a variable thing like (!VER)? - 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: [SOLVED] How do I create a variable thing like (!VER)? (/showthread.php?tid=69037) [SOLVED] How do I create a variable thing like (!VER)? by Agret on 12-01-2006 at 07:43 AM
How do I create a variable thing like (!VER)? RE: How do I create a variable thing like (!VER)? by markee on 12-01-2006 at 07:48 AM
code:If you want it to be case insensitive then use gi rather than just g. This just uses regular expressions, which I highly recommend for all scripters to learn. RE: How do I create a variable thing like (!VER)? by Agret on 12-01-2006 at 08:03 AM Thanks a lot markee, you have been helpful. This forum should get a thanks mod installed RE: How do I create a variable thing like (!VER)? by NiteMare on 12-01-2006 at 08:17 AM
quote: thats like a whole nother language in itself RE: How do I create a variable thing like (!VER)? by Agret on 12-01-2006 at 08:28 AM
Heh, i've gotten somewhat used to regular expressions although they vary in usage. UltraEdit and PHP have different regular expressions and now I'll have to learn the JavaScript ones RE: How do I create a variable thing like (!VER)? by Ezra on 12-01-2006 at 09:09 AM
PHP has two different versions of regex. RE: How do I create a variable thing like (!VER)? by Agret on 12-01-2006 at 12:38 PM markee I finally got around to testing your code and although it replaces the Message thing alright it doesn't actually replace the message that is sent to your recipient, I can only access the new value from a script RE: How do I create a variable thing like (!VER)? by markee on 12-01-2006 at 12:44 PM
quote:Sorry, you have to return the Msg variable, I just put in ... for if you wanted to do more in the script. If you just want to do that one thing then here is the script. code: Btw you can still add more than you want, I just wanted to give you an example or snippet of the code first rather than writing something fully. RE: How do I create a variable thing like (!VER)? by Felu on 12-01-2006 at 12:46 PM
Markee forgot to return the message . code: Edit : Beaten by markee . RE: How do I create a variable thing like (!VER)? by Agret on 12-01-2006 at 02:17 PM
Yeah, I figured it out myself. Forgot to delete my post lol Thanks for replying anyway guys. RE: RE: How do I create a variable thing like (!VER)? by CookieRevised on 12-01-2006 at 07:35 PM
quote: I do not recommend using the case insensitive flag. Reason for this is simple: to be consistant with Messenger Plus!. Tags in Messenger Plus! like (!VER) are case sensitive, so it is better to have that same behaviour in your scripts (just like I would recommend commands to start with "/" and not "!", "^", "$", or whatever else) There is of course no rule which states you can't use the case insesitive flag, but it should be considered as one of the guidelines in handling commands and tags... See also CookieRevised's reply to [Release] Change Me! quote:There isn't a fundamental difference between all the variations. They all work the same. What can be different is that some variations can do more than others (eg: not all variations support back tracking), etc. But the overall way of usage is the same. And that and the logic behind it can be learned. Once you know how regular expressions work, it is only a very small step to adapt your syntax slightly to accomodate the syntax of the language you're working in. As for a cheat sheet, that's why there are easy to use help files with a syntax overview of regular expressions In the JScript Documentation, see: - Contents > JScript > JScript User's Guide > Introduction to Regular Expressions > Regular Expression Syntax or - Index > regular expressions > syntax |