mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
The ability to create tab columns in custom @windows is very useful, but the window sort (-s) feature will only sort lines based on the left most line text, ie, the first column data.

It'd be really awesome to be able to sort window data by column, and to change which column is sorted even after window creation, the same way that tab width can be changed after window creation.

I recommend merging these two features together in their command implementation.

/window -s -t5,10,15*,20

Sort the 3rd column data.

/window -s -t5*2d,10,15*1,20

Sort the 3rd column data, primarily ascending, then the 1st column secondary, descending sort.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
You can already sort by columb with /filter -t on tab after your /window.
If you want it to always sort the data whenever it's added to the window (live), which I like, it should be done with a new switch imo: you need to pass the kind of sort you want anyway, alphabetical, numeric, etc.
Also your proposed syntax most likely break compatibility since a number is expected after -t, it currently should stop after a non digit.

Last edited by Wims; 01/10/18 01:25 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I concede, I forgot /filter had a sort feature. And it's actually rather fast. So, perhaps there isn't a real need for my suggestion after all.

Though, it would make it easier for people to discover and use, since it's right there with the tab stop widths, and very related.

I'm not sure a new switch is really necessary, as the proposed format wouldn't interfere with existing scripts using /window -t. But even so, it could be /window -T then if necessary.

For now, I'll just get along with using /filter -wwczt %n 9 @window @window

Thanks, Ouims!


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Quote:
So, perhaps there isn't a real need for my suggestion after all
I still like the idea as it's a much faster way to get live sorted data.
Quote:
I'm not sure a new switch is really necessary, as the proposed format wouldn't interfere with existing scripts using /window -t
/window -s -t5*2d,10,15*1,20
I believe that currently, just like for any number parameter, mIRC stops at non-digit character and ignores the rest, so your example above is already working in mIRC currently, it wouldn't work the same with this implementation.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard