This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

additional internal commands for sort orders

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC suggestions (English) Printable version
View previous topic :: View next topic  
Author Message
JustAnotherTCUser
Member
Member


Joined: 14 Oct 2008
Posts: 149

PostPosted: Mon Jun 07, 2010 1:53 pm    Post subject: additional internal commands for sort orders Reply with quote

hi,

there are commands like cm_SrcSortByCol1.
these toggle the sort order if column is already sorted.

for better handling sort orders by plugins, what about a set of new commands like cm_SrcSortByCol1Asc & cm_SrcSortByColDesc ?

integrating should be a simple task... Wink

regards
Back to top
View user's profile Send private message
solid
Power Member
Power Member


Joined: 09 Aug 2004
Posts: 528

PostPosted: Tue Jun 08, 2010 1:28 am    Post subject: Reply with quote

Just invoke the command another time and that will reverse the current sort order.
Back to top
View user's profile Send private message Send e-mail
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2146

PostPosted: Tue Jun 08, 2010 3:10 am    Post subject: Reply with quote

Or use TCMC.exe ...
Code:
button8=%Commander_Path%\wcmIcons.dll,52
cmd8=%TCMC% CMcm_SrcSortByCol1 CMcm_SrcNegOrder
menu8=Sort Col1 Reversed


Where TCMC has been SET, by the .CMD I use to launch TC.

RunTC.cmd
Code:
@ECHO OFF
SET PATH=%SYS32%;C:\WIN2K;%wuBIN%;%wuBin%\exCMD;%wuBIN%\exDOS;%SYS32%\Wbem
SET TC=%ProgramFiles%\TotalCMD
SET TCmd=%TC%\TotalCMD.exe
SET TCMC=%TC%\TOOLS\TCMC.exe 50
SET APPLOCAL=%USERPROFILE%\Local Settings\Application Data
START "" "%ProgramFiles%\TotalCMD\TotalCMD.exe"
Back to top
View user's profile Send private message Send e-mail
JustAnotherTCUser
Member
Member


Joined: 14 Oct 2008
Posts: 149

PostPosted: Tue Jun 08, 2010 5:02 am    Post subject: Reply with quote

hi,

doesn't work as expected.
both commands toggle the sort order if this column is already sorted.

the only way i know to get a defined state is, sorting any other column and then sort the desired column.

but that's only a unsatisfying workaround...

regards
Back to top
View user's profile Send private message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2146

PostPosted: Tue Jun 08, 2010 8:18 am    Post subject: Reply with quote

AH, Would need to Unsort first then.
Code:
button8=%Commander_Path%\wcmIcons.dll,52
cmd8=%TCMC% CMcm_Unsorted CMcm_SrcSortByCol1 CMcm_SrcNegOrder
menu8=Sort Col1 Reversed

_________________
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7864
Location: Russian Federation

PostPosted: Tue Jun 08, 2010 8:22 am    Post subject: Reply with quote

Balderstrom wrote:
AH, Would need to Unsort first then.

The problem is that this will add another sort change. It may have much time to change sort method triple.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
byblo
Senior Member
Senior Member


Joined: 20 Feb 2005
Posts: 209

PostPosted: Sun Aug 06, 2017 11:30 pm    Post subject: Reply with quote

Having the same frustrating problem.

If using the cm_SrcSortByCol1 while it is already sorted, will toggle the sort direction Sad

I strongly support the OP suggestion:
adding a new cm_SrcSortByCol1Asc & cm_SrcSortByCol1Desc, cm_SrcSortByCol2Asc ect... would be perfect and natural to use.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34350
Location: Switzerland

PostPosted: Mon Aug 07, 2017 7:48 am    Post subject: Reply with quote

Have you tried to chain 2 commands, e.g.
cm_SrcUnsorted,cm_SrcSortByCol1
or 3:
cm_SrcUnsorted,cm_SrcSortByCol1,cm_SrcSortByCol1
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7864
Location: Russian Federation

PostPosted: Mon Aug 07, 2017 9:19 am    Post subject: Reply with quote

ghisler(Author),
It will be too slow in large folders...
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7195
Location: Valsted, Denmark

PostPosted: Mon Aug 07, 2017 11:03 am    Post subject: Reply with quote

Quote:
I strongly support the OP suggestion:
adding a new cm_SrcSortByCol1Asc & cm_SrcSortByCol1Desc, cm_SrcSortByCol2Asc ect... would be perfect and natural to use.


It should rather be implemented the same way as it if for the other sort functions - with a parameter:

history.txt
Quote:
20.09.16 Added: The following internal commands now accept parameters 0 (toggle, default), 1 (true), and 2 (false), except in main menu (* stands for LEFT, RIGHT, and SRC): CM_VERTICALPANELS,CM_*THUMBS,CM_*BYNAME,CM_*BYEXT,CM_*BYSIZE,CM_*BYDATETIME,CM_*NEGORDER (32/64)

_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
byblo
Senior Member
Senior Member


Joined: 20 Feb 2005
Posts: 209

PostPosted: Sun Aug 13, 2017 1:31 am    Post subject: Reply with quote

ghisler(Author) wrote:
Have you tried to chain 2 commands, e.g.
cm_SrcUnsorted,cm_SrcSortByCol1
or 3:
cm_SrcUnsorted,cm_SrcSortByCol1,cm_SrcSortByCol1


Yes doing something similar as workaround: cm_SrcSortByCol2,cm_SrcSortByCol1
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34350
Location: Switzerland

PostPosted: Mon Aug 14, 2017 8:22 am    Post subject: Reply with quote

You should only sort by custom column as the last command - it's considerably slower than sorting by internal values like name or size. So better use
cm_SrcUnsorted,cm_SrcSortByCol1
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC suggestions (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group