mIRC Home    About    Download    Register    News    Help

Print Thread
/filter and listboxes #102502
09/11/04 08:33 PM
09/11/04 08:33 PM
Joined: Feb 2003
Posts: 38
C
cvic Offline OP
Ameglian cow
cvic  Offline OP
Ameglian cow
C

Joined: Feb 2003
Posts: 38
I have a listbox with lines like:
*.blah.yoho.se SMURFDALEN
*.foo.bar.se SNOPPSKOGEN
*.lala.heey.se RAJRAJ

Is it possible to sort listbox by domain or topdomain?
By domain this would result in this:
*.foo.bar.se SNOPPSKOGEN
*.lala.heey.se RAJRAJ
*.blah.yoho.se SMURFDALEN

Re: /filter and listboxes #102503
10/11/04 06:18 AM
10/11/04 06:18 AM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Sigh  Offline
Fjord artisan
S

Joined: Aug 2003
Posts: 314
Yes, look at the 't' switch in filter, in this case /filter -ctio 2 46 dname id dname id

Re: /filter and listboxes #102504
10/11/04 09:32 AM
10/11/04 09:32 AM
Joined: Feb 2003
Posts: 38
C
cvic Offline OP
Ameglian cow
cvic  Offline OP
Ameglian cow
C

Joined: Feb 2003
Posts: 38
Quote:
Yes, look at the 't' switch in filter, in this case /filter -ctio 2 46 dname id dname id


Sorry, but I forgot to say that not all lines looks like those. They can also look like this:
*.foo.bar.se SNOPPSKOGEN BLA BLA
*.lala.heey.gnnn.se RAJRAJ SGFSD
*.blah.se SMURFDALEN DSFSDFDS SDFSDFSD SDFSDFSD
*.blah.heee.yoho.com SMURFDALEN DSFSDFDS SDFSDFSD RRRG

How can I tell mIRC to sort by top domain in this case? smirk
I hoped that I could use a negative value in /filter like this: /filter -ctio -1 46 dname id dname id

Re: /filter and listboxes #102505
10/11/04 10:06 AM
10/11/04 10:06 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
qwerty  Offline
Hoopy frood
Q

Joined: Jan 2003
Posts: 2,523
Use a bigger number for the column, big enough to always exceed the maximum possible number of tokens in the address masks, eg
/filter -ctio 50 46 dname id dname id


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: /filter and listboxes #102506
10/11/04 10:25 AM
10/11/04 10:25 AM
Joined: Feb 2003
Posts: 38
C
cvic Offline OP
Ameglian cow
cvic  Offline OP
Ameglian cow
C

Joined: Feb 2003
Posts: 38
I tried that, but it doesn't work. It's the same thing as using 1 for the column.


Btw, a bug. mIRC thinks swedish character Ň is an A.
Cause /filter sorts like this:
Aaa
Ňab
Aad
...and so on.

Re: /filter and listboxes #102507
10/11/04 10:51 AM
10/11/04 10:51 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
qwerty  Offline
Hoopy frood
Q

Joined: Jan 2003
Posts: 2,523
Hmm you're right. I could almost swear this trick has worked for me in the past, either I'm wrong or something has changed. The only way, then, is to use the -a switch and write an alias that does the sorting:
Code:
alias tldsort if ($gettok($1,-1,46) > $gettok($2,-1,46)) return 1 | return -1
Then use
/filter -caio dname id dname id tldsort


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