mIRC Home    About    Download    Register    News    Help

Print Thread
Searching in more than one window #210145 06/03/09 11:45 AM
Joined: Jul 2004
Posts: 11
F
fluor2 Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2004
Posts: 11
I am active in more than one channel and more than one network, and I often have problem finding back to who sent me what message about a specific topic. So it would be really nice to be able to search all windows and not only the current with CTRL-F. Can you please make an option for me, or at least provide me with code that will work?

Re: Searching in more than one window [Re: fluor2] #210155 06/03/09 10:30 PM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
The ability to do this can be easily coded in mIRC via the use of /filter.

Example:

Code:
alias wildfind {
  var %w = @wildfind , %i = 1 , %text = $1-
  window -he %w
  clear %w
  while ($chan(%i)) {
    aline %w -------------- Channel: $v1
    filter -wwzb $v1 %w %text
    aline %w 
    inc %i
  }
  window -aw3 %w
}


/wildfind *Some*Wildcard*Text*


Edit: This script will search your (current networks) channels, and any matches found will be printed into the "@wildfind" window.

Last edited by Rand; 06/03/09 10:39 PM.
Re: Searching in more than one window [Re: Rand] #210157 06/03/09 11:18 PM
Joined: Jul 2004
Posts: 11
F
fluor2 Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2004
Posts: 11
thank you very much

Re: Searching in more than one window [Re: fluor2] #210391 14/03/09 05:28 PM
Joined: Jul 2004
Posts: 11
F
fluor2 Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Jul 2004
Posts: 11
uh this one does not scan all networks! could somebody please help me.

Re: Searching in more than one window [Re: fluor2] #210392 14/03/09 06:10 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Use /scon -at1 /wildfind *Some*Wildcard*Text*

That will perform the same /wildfind on all networks that you are connected to.

Re: Searching in more than one window [Re: Rand] #210438 16/03/09 12:11 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Don't do it the way RusselB suggested, or the window would only contain the last networks scanned channels. There's two options for this, one: you can do it the way RusselB said, but remove the /clear command from the script, or you can do it the more optimal way, and code it in (so that you don't do something stupid by accident with the double evaluating nature of /scon).

With just a couple changes you can make it safe and idiot proof. (or so we hope....)
Code:
alias wildfind {
  var %w = @wildfind , %text = $1-
  window -he %w | clear %w

  var %n = 1
  while ($scon(%n)) {
    scon %n
    aline 4 %w --------[ NETWORK: $network ]----------

    var %i = 1
    while ($chan(%i)) {
      aline 4 %w -------------- Channel: $v1
      filter -wwzb $v1 %w %text
      aline %w 
      inc %i
    }

    scon -r
    inc %n
  }

  window -aw3 %w
}

Re: Searching in more than one window [Re: Rand] #210439 16/03/09 12:47 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Ooops... I missed the /clear command when I was looking over the code before making my suggestion.
Not sure how I missed such an obvious line.