mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 6
J
Jonkka Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: May 2005
Posts: 6
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,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Joined: Mar 2005
Posts: 18
A
Pikka bird
Offline
Pikka bird
A
Joined: Mar 2005
Posts: 18
How to do this alphabetically? I look at the switches in help but it explains not very well.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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

Joined: May 2005
Posts: 1
B
Mostly harmless
Offline
Mostly harmless
B
Joined: May 2005
Posts: 1
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