"Style" - 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: "Style" (/showthread.php?tid=63040) "Style" by wlmcrap on 07-11-2006 at 01:23 PM
How could i make a script like in Styles 1.0? (as shown below) RE: "Style" by RaceProUK on 07-11-2006 at 03:15 PM Use the OnEvent_SendMessage() event (is the name right?), and just do a bit of string manipulation. Should be quite easy to do actually, especially if you use the full power of JScript and the Scripting Engine RE: "Style" by wlmcrap on 07-11-2006 at 10:18 PM Could you maybe do it for me, seeing as I'm new to scripting and you said it would be easy? RE: "Style" by craig2k5 on 07-11-2006 at 10:56 PM im sure this would be easy all it would be is checking the messsage that is being sent.. then If its a "a" then replace it with an "á" RE: "Style" by Joereynolds89 on 07-11-2006 at 11:08 PM
if someone could make this be sooo helpful as i have my own style of letters i would like to use in msn RE: "Style" by craig2k5 on 07-11-2006 at 11:12 PM Ill Give This a shot RE: "Style" by Joereynolds89 on 07-11-2006 at 11:25 PM i got most of it from another forum, i just have the problem of having it repeat, for example i get A by putting a but if i put aaa i get Aaa if that makes sense? RE: "Style" by Silentdragon on 07-11-2006 at 11:48 PM This might be relevant to the topic. http://shoutbox.menthix.net/showthread.php?tid=63...d=692420#pid692420 RE: "Style" by wlmcrap on 07-12-2006 at 01:52 AM Don't worry about making the script, i made it myself just a couple of minutes ago. RE: "Style" by cloudhunter on 07-13-2006 at 01:25 AM
Care to post the script? I wouldn't mind it RE: "Style" by wlmcrap on 07-13-2006 at 01:28 AM Yep! Here you go. RE: "Style" by ddunk on 07-13-2006 at 01:37 AM
quote:That will only replace the first occurence. quote:You need to use regexps if you want to do that. See: Pai's reply to [Help] Replacing Text Using Scripts (I think I'm dumb lol) and segosa's reply to [Help] Replacing Text Using Scripts (I think I'm dumb lol) RE: "Style" by deAd on 07-13-2006 at 01:42 AM
Not really. You can use the String.replace function with a loop. code: Then you can say: code: RE: "Style" by CookieRevised on 07-13-2006 at 09:39 AM
quote:Although you indeed can, it is also a bit useless to do that. One should indeed use the regular expression syntax for replacing all occurences of a search string. This is even documented like that in the official MS JScript references. PS: your example code for the loop will produce wrong results in certain cases. And actually shows why you should not use a loop like that to replace all occurences of a string. |