mIRC Home    About    Download    Register    News    Help

Print Thread
J
Jonkka
Jonkka
J
I have no idea if this is possible at all, but I'll ask here anyway smile
I have a textfile containing a nick and a number like this:

nick1 13
nick2 4
nick3 17

and so i would like something that would organize the file so that the one with highest number would be on first line in the text file and so on. But is it possible to do such a thing with mirc script and a text file or should I use some other method for this?

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Suppose you had those nicks with their according score in a file called score.txt, located in your main mIRC folder. All it takes to sort those based on their score, in descending order is the issuing of the /filter command like this:

/filter -ffctue 2 32 score.txt score.txt

A
adazh
adazh
A
How to do this alphabetically? I look at the switches in help but it explains not very well.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
leave off the ue in the /filter command...the u makes it a numeric sort, the e makes it in descending order.
For an alphabetic sort (A - Z) just leave off those two switches, although you'll have to change what you're sorting by, as the original was looking at the numbers

B
Berry975
Berry975
B
and how about an ini file? if i want to sort this file it doesnt quite do what it must be frown
the ini file looks like this :
[Words]
Berry975=50
Berry974=14000
Berr976=1
Berry977=1587

How can i sort this in a new file bij most words first?


Link Copied to Clipboard