mIRC Home    About    Download    Register    News    Help

Print Thread
#45188 30/08/03 12:06 PM
Joined: Aug 2003
Posts: 5
S
sala Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 5
$sorttok(1075 a.15 b.3 c.17 d.645 e.21 f.24 g.43 h.20 i.590 j,46,nr)


with 6.03 this worked like a charm, now with 6.1 it gives:
6.03: 1075 a.645 e.590 j.43 h.24 g.21 f.20 i.17 d.15 b.3 c
6.10: 645 e.590 j.43 h.3 c.24 g.21 f.20 i.17 d.15 b.1075 a

How can i get the order correctly now ?

#45189 30/08/03 12:38 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Usage: $sorttokn(<text>,C[,r])
$sorttokn(<text>,C) returns in normal order
$sorttokn(<text>,C,r) returns in reverse order
Code:
alias sorttokn {
  write -c temp.txt $replace($1,$chr($2),$lf)
  filter -ffcut $+ $iif(r isin $3,e) 1 10 temp.txt temp.txt
  bread temp.txt 0 940 &amp;a
  .remove temp.txt
  return $gettok($replace($bvar(&amp;a,1-).text,$crlf,$chr($2)),1-,$2)
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#45190 30/08/03 07:24 PM
Joined: Aug 2003
Posts: 5
S
sala Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 5
You're a life saver laugh

#45191 05/09/03 05:19 PM
Joined: Sep 2003
Posts: 3
K
Self-satisified door
Offline
Self-satisified door
K
Joined: Sep 2003
Posts: 3
It does the job, and therefore $sorttok won't ever be modified back, but this is actually more a fix than anything else. Indeed, numeric sort on an alphanumeric list can output so many result (the most logic being a comparison with ASCII value). But it still is usatisfactory: write a file, do binary changes... That's only worth a temporary solution.

I won't label this a bug, but I'll have to wait and test any new version to see how the behaviour changes. $sorttok was an elegant and built-in solution that I now lack a lot in mIRC 6.1

@qwerty
Regarding the other thread, I did search it but on another forum, and didn't test it out, because it was looking a bit too different (yet much alike script), and not related to 6.1
But all in all, I did miss this important thread; which exactly matched my research query

Last edited by Kurosu; 05/09/03 05:25 PM.

Link Copied to Clipboard