mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2018
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
All I'm trying to do is:

1. Look for all lines containing *text* in a #channel.
2. List those lines either in either same #channel window, status window or any other window.

All I can get working is /filter -ss *text*, which works in status window perfectly.

Anything else I try using switches in #channel windows, I either get "invalid window" or "invalid parameters." I can't find real-world examples either. All I need is to list matched text lines without any sorting or ranges.

Can anyone provide real-life examples? For example: Scan all lines in #mirc for text which contains *abc* and output those matching lines to either same window, status window or custom window.

Thanks.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Code:
/window -e @window
/filter -ww #channel @window *text*

(in fact, the -ww are generally optional)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Nov 2018
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
Already tried that.

Tried it again by copying what you typed.

Still receiving: * /filter: invalid window

I'm on mIRC 7.52

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
It works on my copy of mIRC 7.52
Don't really know what to tell you.

Try this.
Code:
; /findall sometext
findall {
  var %src = $active, %win = @findall, %pattern = $(*,$1-,*)
  window -e %win
  filter -ww %src %win %pattern
  echo -tic notice %win --- Found $filtered matches in %src for %pattern $+ .
} ; by Raccoon 2018


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
The only reasons you should have failed would be either

1. You used #channel instead of the actual Channel Name.
2. If you did the 2nd command in the status window of a different network than the one where the #channel is open.

Joined: Nov 2018
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
Originally Posted By: Raccoon
It works on my copy of mIRC 7.52
Don't really know what to tell you.

Try this.
Code:
; /findall sometext
findall {
  var %src = $active, %win = @findall, %pattern = $(*,$1-,*)
  window -e %win
  filter -ww %src %win %pattern
  echo -tic notice %win --- Found $filtered matches in %src for %pattern $+ .
} ; by Raccoon 2018


A script solution isn't going to work for my needs.

Joined: Nov 2018
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
Originally Posted By: maroon
The only reasons you should have failed would be either

1. You used #channel instead of the actual Channel Name.
2. If you did the 2nd command in the status window of a different network than the one where the #channel is open.


Same network. Proper names were used for existing channels and creation of new output windows. I even tried switching stuff around, trying different channels (I'm in all channels, NetAdmin) and different windows names, just in case there's a naming conflict.

Maybe someone can come up with 20 different lines I can try?

Last edited by StanSmith; 04/11/18 10:33 AM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
If you paste this into the editbox in of the channel, this should work:

Code:
//window -c @window | window -en @window | filter -ww $active @window * | window -a @window


Joined: Nov 2018
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
Originally Posted By: maroon
If you paste this into the editbox in of the channel, this should work:

Code:
//window -c @window | window -en @window | filter -ww $active @window * | window -a @window



Thanks, it works and I've added it to popups as this:

Code:
//window -c @window | window -en @window | filter -ww $active @window * $+ $$1 $+ * | window -a @window


(Basically looking for a history of everything a specific user has typed)

/filter switches room window *text* would still work better in my specific case. Does anyone have an idea why it's not working as, what seems like, was intended?

If there aren't any other ideas, that's fine. I can live with the alternative. Thanks for the input.

Edit:

This works too:

Code:
//window -c @ $+ $$1 | window -en @ $+ $$1 | filter -ww $active @ $+ $$1 * $+ $$1 $+ * | window -a @ $+ $$1

Last edited by StanSmith; 04/11/18 11:33 AM.

Link Copied to Clipboard