What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Replace Colour Codes

Replace Colour Codes
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Replace Colour Codes
quote:
Originally posted by Shondoit
So? They are replaced now... to replace it for gradients, would mean alot of ·$n codes, wich will boost your text length with umm, at least 300% :O
Unpractical

If he wants it, I could have a look at it
That's not the point. I didn't say you need to simulate a gradient with irc codes (it would be cool though).

The request was to replace bbcode color codes, so they don't exist anymore in the string. This means if a gradient is done, that code should be replaced too (with whatever) and not be left in because "irc codes don't support gradients".

This is the same if you have a file saved in Word and you want to convert it to a textfile. You don't want to keep all the "not supporting" codes in it, they should be replaced too (with nothing; aka removed).

PS: as said, if hexadecimal color codes are used, Plus! will interpret the first 6 characters, but anything after that is ignored (as long as the string doesn't exceep 53 characters). So add ".{0,53}?" after each "[0-9A-Fa-f]{6}" (but they shouldn't be captured of course).

quote:
Originally posted by Shondoit
(btw, I saw the text you now edited out, please tell what didn't work, for learning purpose)
I removed it because a) I thought I was wrong in saying that, b) nobody replied yet.

but as a matter of fact, I wasn't wrong :D

1) "[1-6]?\d" should actually be "[0-9]{1,2}" or "\d{1,2}". Numbers from 0 to 99 are allowed.

2) the irc codes should contain 2 digits, not 1. 1 digit is possible to use, but may conflict with the actual string you try to color if it begins with a number. Same for backgrounds.


EDIT: blah... what SpunkyLoveMuff said below, while I was editing this :p

EDIT2: ".{0,53}" should be ".{0,53}?"

This post was edited on 09-09-2006 at 12:33 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-08-2006 05:07 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Replace Colour Codes - by Spunky on 09-07-2006 at 08:20 PM
RE: Replace Colour Codes - by alexp2_ad on 09-07-2006 at 08:31 PM
RE: Replace Colour Codes - by Spunky on 09-07-2006 at 08:32 PM
RE: Replace Colour Codes - by KnRd_WC on 09-07-2006 at 09:15 PM
RE: Replace Colour Codes - by deAd on 09-07-2006 at 09:17 PM
RE: Replace Colour Codes - by Spunky on 09-07-2006 at 09:18 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 03:42 PM
RE: Replace Colour Codes - by Matti on 09-08-2006 at 04:17 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 04:21 PM
RE: Replace Colour Codes - by CookieRevised on 09-08-2006 at 04:35 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 04:45 PM
RE: RE: Replace Colour Codes - by CookieRevised on 09-08-2006 at 04:51 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 04:57 PM
RE: Replace Colour Codes - by CookieRevised on 09-08-2006 at 05:07 PM
RE: Replace Colour Codes - by Spunky on 09-08-2006 at 05:15 PM
RE: Replace Colour Codes - by Eljay on 09-08-2006 at 05:20 PM
RE: Replace Colour Codes - by Spunky on 09-08-2006 at 05:23 PM
RE: Replace Colour Codes - by CookieRevised on 09-08-2006 at 05:24 PM
RE: Replace Colour Codes - by Spunky on 09-08-2006 at 05:28 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 10:40 PM
RE: Replace Colour Codes - by Spunky on 09-08-2006 at 10:43 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 10:49 PM
RE: Replace Colour Codes - by Spunky on 09-08-2006 at 10:51 PM
RE: Replace Colour Codes - by Shondoit on 09-08-2006 at 10:53 PM
RE: RE: Replace Colour Codes - by CookieRevised on 09-09-2006 at 02:08 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On