mIRC Home    About    Download    Register    News    Help

Print Thread
Filter #21499 29/04/03 02:09 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Lets say I have a window @wind and it has a line that was added to it by:
/aline @wind hello 4to you 12too
So it has the hello in black, the "to you" in red, and the "too" in blue.

Now I want to use the filter command so the text will be ripped from the windows to a text file, but without the colors:

/filter -wf @wind hello.txt

Since the colors are not being striped, I get:
hello 4to you 12too
in the text files.

What must I do, so I will only get "hello to you too" ?

Second questioon:
Lets say I have the hello.txt file with the "hello to you too" line.
How to I add it to a window, using the FILTER command, so it will be in a color that I want it to be (and not black)??

I don't want to use a while loops to scan the window, or the text file, cause if the file is big, it may take a long time, and with Filter command it take less than a second.

Thanks


Re: Filter #21500 29/04/03 02:11 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help /filter
-b switch


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Filter #21501 29/04/03 02:21 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I know it is the -b switch!!!!!

But there isn't any explenation on how to use it!!

And you don't have any answer to my second question.


Re: Filter #21502 29/04/03 02:23 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
there's no answer to your second question

If you don't know how to RTFM you're in deep... there...

Last edited by theRat; 29/04/03 02:26 PM.

Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Filter #21503 29/04/03 02:26 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
But what about the first question?

How do I use the -b switch?

If I write:
/filter -wfb @wind hello.txt

I still get the same thing.

Re: Filter #21504 29/04/03 02:28 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
oh, my mistake, you have to strip 'em with loops...


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: Filter #21505 29/04/03 02:33 PM
Joined: Feb 2003
Posts: 282
S
saragani Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Isn't there a way of doing it without striping it with a loop??

A loop take a lot of resources and time, when the @wind has a lot of lines in it.


Re: Filter #21506 29/04/03 03:16 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Unfortunately there's no other way that doing it line-by-line. In case you care, all the -b switch does is strip the control codes from the wildcard text used in /filter, ie it just saves you using $strip(<wildcard>).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com