mIRC Homepage
Posted By: WarlockW Filter help ? - 18/10/05 04:54 PM
Anyway to get the filter command to ignore
every other line in a text file ?

line 1
line 2


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 ...
Posted By: Riamus2 Re: Filter help ? - 18/10/05 05:07 PM
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).


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
Posted By: WarlockW Re: Filter help ? - 18/10/05 09:16 PM
yea .. the filter twice works ..

with the -x switch -

wonder if there is a way to sort the output ?
Posted By: DaveC Re: Filter help ? - 18/10/05 09:42 PM
/help $hfind
specificly the use of the .data property


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.
Posted By: hixxy Re: Filter help ? - 18/10/05 10:10 PM
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.
Posted By: DaveC Re: Filter help ? - 18/10/05 11:27 PM
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.
Posted By: WarlockW Re: Filter help ? - 19/10/05 12:04 AM

LOL omg ..

/hsave -on hashtable tempfile.txt

That Works ! Thanks DaveC !

Yes .. that works great ..

And No .. I dont ! lol
Posted By: hixxy Re: Filter help ? - 19/10/05 12:04 AM
Yes. I mean is.
Posted By: Riamus2 Re: Filter help ? - 19/10/05 01:17 PM
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
© mIRC Discussion Forums