changing words in sent text? - 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: changing words in sent text? (/showthread.php?tid=94568) changing words in sent text? by moon_lit_shadow on 05-11-2010 at 07:51 PM
I'm working on a very small script to try to replace words in a sentence (for testing purposes) and I'm unsure exactly how to do this. I was wondering if perhaps someone could tell me what i'm doing wrong? code: Anyone able to help? EDIT: Oh yeah, my question is just how to return the array of the message that is going to be sent to be the new output message. Sort of like the word replace feature. (I'm changing all the words at the moment with the for loop/array, but in the end i intend to use a switch/case branch. It's just to test things for now to get the hang of it) RE: changing words in sent text? by Chrissy on 05-11-2010 at 10:29 PM
Changing a message being sent: code:(ChrisBoulton) RE: changing words in sent text? by Spunky on 05-12-2010 at 05:21 AM
quote: No, It'll replace one instance. For all instances you would have to use a RegExp with the g modifier js code: g = global i = case insensitive Anything between the slashes (/) are the RexExp to look for. Special characters can also be used here to denote certain things. |