mIRC Home    About    Download    Register    News    Help

Print Thread
Is there an easy way to strip the colour of text? #212849 07/06/09 01:06 AM
Joined: Oct 2008
Posts: 167
S
seanturner70 Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Oct 2008
Posts: 167
I am trying to make some scripts a bit more usable, by striping colours so they can be used with a little bit less fuss.
However, I'm not at all enjoying (I know it's not meant to be enjoyable) reading through a script and working out where the $strip($1)'s need to go.

Is it possible, to have a bit at the beginning or something similar that will strip all the text before putting it through the rest of the script?

Thank you for any replies. smile

Re: Is there an easy way to strip the colour of text? [Re: seanturner70] #212851 07/06/09 01:55 AM
Joined: Aug 2006
Posts: 183
T
Thrull Offline
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
It would depend on the script, I suppose. If its fairly simple, using $strip($1-) ought to do what you want it to do.


Yar
Re: Is there an easy way to strip the colour of text? [Re: seanturner70] #212852 07/06/09 02:15 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you are talking about a onTEXT (or similar) event, you can add this as the first line inside the event:

tokenize 32 $strip($1-)

-genius_at_work

Re: Is there an easy way to strip the colour of text? [Re: seanturner70] #212853 07/06/09 02:16 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you have an ON START event in the script, you could just add
Code:
.strip +c
to the event.
See /help /strip