mIRC Home    About    Download    Register    News    Help

Print Thread
Filter help ? #133286 18/10/05 04:54 PM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133
Anyway to get the filter command to ignore
every other line in a text file ?

line 1
aaaa
line 2
bbbb

ect.

I need it not to seach line 1 of the text file
then seach line two
the ignore line 3
then search line 4

HELP ! lol

Or Is There A way
to get : hget or hfind to find something in a hash table
and repeat till it dont find anything ?

i am saving info to a hash table then saving it to a text file
i want to seach he hash table or txt file for key words

then have it notice me the results ...

Last edited by WarlockW; 18/10/05 05:02 PM.
Re: Filter help ? #133287 18/10/05 05:07 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I don't think you can do that automatically with /filter. However, if you can make the lines you don't want searched to have some form of identifying character(s), you can exclude those.... (I assume this is from /hsave data).

Example:

All items start with "item_". You can easily remove that from the item name if you need to display the item name later. Then, you can use the -x switch to exclude all lines with item_* in them. Then, you search the other lines for whatever you need. It would end up being two filters, but I'm not sure if there is a better option. Someone else can prove me wrong... I like learning new things. laugh


Invision Support
#Invision on irc.irchighway.net
Re: Filter help ? #133288 18/10/05 09:16 PM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133
yea .. the filter twice works ..

with the -x switch -

wonder if there is a way to sort the output ?

Re: Filter help ? #133289 18/10/05 09:42 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
/help $hfind
specificly the use of the .data property

$hfind(hashtable,matchtext,N,w).data

This informs $hfind to wildmatch the hashtables DATA with matchtext, rather than the ITEM names.


* as to the noticing your self the results, i suggest you use ECHO -a as its much faster than sending yourself notices.

Re: Filter help ? #133290 18/10/05 10:10 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You could also /filter with the -n (include line numbers) switch to an alias and check that the first parameter passed to that alias isn't a multiple of 2.

Re: Filter help ? #133291 18/10/05 11:27 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I think you ment IS a multiple of 2, as he wants the data compared not the itemnames.

Funny thing was i was going to say that myself, well something like it, i actually wrote it down, then reread his request and picked up hes just doesnt understand how to use $hfind

I also just thought, considering we know what he wants to do, just be listed the resulting matches. so...
/hsave -on hashtable tempfile.txt
/filter -ffc tempfile.txt tempfile.txt matchtexthere
/play -n $nick tempfile.txt

that should work.

Re: Filter help ? #133292 19/10/05 12:04 AM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133

LOL omg ..

/hsave -on hashtable tempfile.txt

That Works ! Thanks DaveC !

Yes .. that works great ..

And No .. I dont ! lol

Re: Filter help ? #133293 19/10/05 12:04 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Yes. I mean is.

Re: Filter help ? #133294 19/10/05 01:17 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Good point with the -n... I still haven't dabbled too much in /filter... at some point, I need to get that down really well. smile


Invision Support
#Invision on irc.irchighway.net