Getting partial String (argument to command.) - 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 partial String (argument to command.) (/showthread.php?tid=69034) Getting partial String (argument to command.) by AITEE on 12-01-2006 at 02:46 AM
Hi, What I need is to be able have something like /SOMETHINGCONSTANT and then here, something that is like a variable that changes each time. RE: Getting partial String (argument to command.) by Spunky on 12-01-2006 at 02:54 AM
you could either use code:Mulitple spaces can cause errors or if you know the length of the command code: The best way however is to use a RegExp on the Message variable. I don't how these work but if you use the search function, CookieRevised usually advises to do this and has posted numerous examples RE: Getting partial String (argument to command.) by phalanxii on 12-01-2006 at 05:56 AM With regular expression: code:I'm not sure if the regular expression is 100% correct, but it works as it's supposed to anyway. With this one, you can have spaces in your parameters and you don't need to count the length of the command. The parameter is also optional (if your command doesn't require parameters, it still works). If you need more than one parameter (separated by a space), you can use another regular expression. RE: Getting partial String (argument to command.) by markee on 12-01-2006 at 06:14 AM Have a look at the Script wiki here for information on creating commands that are recognised by MP!L, it's how I do it whenever I use a command. |