Internal DC commands, which are very lacking in TC

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Internal DC commands, which are very lacking in TC

Post by *Fla$her »

✅ — implemented in TC 11+
The most necessary ones are highlighted in green:

cm_CopyNoAsk ✅
cm_RenameNoAsk
✅
cm_Benchmark
cm_DriveContextMenu ✅
cm_ShowMainMenu
cm_ShellExecute
cm_HardLink
cm_SymLink
cm_Wipe

cm_CopyPathOfFilesToClip
(not to be confused with cm_CopyFullNamesToClip) ✅
cm_CopyPathNoSepOfFilesToClip

cm_ChangeDirToHome (cd %USERPROFILE%)
cm_LeftEqualRight
cm_RightEqualLeft
cm_OpenDriveByIndex ✅
cm_QuickSearch
/ cm_QuickFilter (divides cm_ShowQuickSearch) ✅

cm_ShowCmdLineHistory (like Alt+F8) ✅
cm_AddFileNameToCmdLine ✅
cm_AddPathAndFileNameToCmdLine
✅

cm_ViewSearches
cm_DeleteSearches
cm_DebugShowCommandParameters

cm_ActivateTabByIndex
cm_RenameTab ✅
cm_CopyAllTabsToOpposite
cm_SetAllTabsOptionNormal ✅
cm_SetAllTabsOptionPathLocked ✅
cm_SetAllTabsOptionPathResets ✅
cm_ReloadFavoriteTabs
cm_ResaveFavoriteTabs

cm_PreviousFavoriteTabs
cm_NextFavoriteTabs

cm_ViewLogFile
cm_ClearLogFile
cm_ExecuteScript

Detailed descriptions of the commands can be found here.
Let's discuss (without third-party tools).
Last edited by Fla$her on 2023-05-25, 18:02 UTC, edited 3 times in total.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *petermad »

cm_ActivateTabByIndex
We have cm_SrcActivateTab1 - cm_SrcActivateTab99
but I guess cm_ActivateTabByIndex takes a parameter

cm_ShowCmdLineHistory (like Alt+F8)
cm_AddFileNameToCmdLine
cm_AddPathAndFileNameToCmdLine
These should be easy to implement since the functionality is already there (Alt+F8, Ctrl+Enter and Shift+Ctrl+Enter)

cm_ShowMainMenu
Here we only have Alt, F9 and F10 and no commands for the functions either.

cm_LeftEqualRight
cm_RightEqualLeft
Here we only have cm_MatchSrc

cm_OpenDriveByIndex
Here we have cm_GotoDriveA - cm_GotoDriveZ
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *Fla$her »

petermad wrote: 2023-02-26, 19:59 UTC but I guess cm_ActivateTabByIndex takes a parameter
...
These should be easy to implement since the functionality is already there
Right. The same goes for cm_RenameTab. And in general, most of the commands can be implemented simply, including due to similarity/analogy.
petermad wrote: 2023-02-26, 19:59 UTC Here we only have Alt, F9 and F10
These are not analogs at all. It's not about focus, it's about showing. This is a switching command (like TCFS2.exe /ei mm2).
petermad wrote: 2023-02-26, 19:59 UTC Here we only have cm_MatchSrc
Yes, and in DC, the analog is cm_TargetEqualSouce (Alt+Z), with the same dependence on focus.
petermad wrote: 2023-02-26, 19:59 UTC Here we have cm_GotoDriveA - cm_GotoDriveZ
Indexes are not tied to letters, they are tied to the displayed drives, which is much more convenient to work with, knowing the total number.
As a result, in DC, the current drives are switched by Ctrl+1/2/3/etc.
Overquoting is evil! 👎
konfekt
Junior Member
Junior Member
Posts: 12
Joined: 2021-11-16, 09:26 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *konfekt »

Hello, how come, say, cm_SymLink can be implemented in DC but not TC? Aren't they both written in Pascal and should have access to the same libraries? As DC is free, I imagine it does not use proprietary unaffordable libraries to this end? Or is it using a library with a commercially unusable license?
Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *Fla$her »

2konfekt
The absence of the listed commands in TC is not stated as unenforceable and is not related to the language, but to the desire of the author.
TOTALCMD.CHM wrote:Total Commander was written utilizing Borland Delphi 1.0 (16 bit) and 2.0 (32 bit) (© 1993-96 by Borland International), and Lazarus/Free Pascal (64 bit).
Overquoting is evil! 👎
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *igarny »

konfekt wrote: 2023-04-24, 13:19 UTC Hello, how come, say, cm_SymLink can be implemented in DC but not TC? Aren't they both written in Pascal and should have access to the same libraries? As DC is free, I imagine it does not use proprietary unaffordable libraries to this end? Or is it using a library with a commercially unusable license?
Hmm would you suggest TC should also be made free?
I am not aware which functions and libraries introduce the functionality in DC, which is missing in TC, BUT what I know is that there are open libraries, which are available thorough certain licenses and there may lay the problem....
Once used you either pay tribute or you open your product to the public.... and I am not sure for the first part... everything is buried in the small text in the details of intellectual properties.
Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *Fla$her »

igarny wrote: 2023-04-26, 08:34 UTCand there may lay the problem....
With the exception of cm_Benchmark and cm_Wipe, I don't imagine any special problems with third-party libraries and the need to integrate them.
Overquoting is evil! 👎
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *igarny »

Let us be realistic und pragmatic. I would like to fully support this, but there are items, which are directly achievable through extended commands.
With regards of the list my suggestion is that:
- some are removed: obvious is:
cm_ChangeDirToHome (cd %USERPROFILE%)
easily achievable through extended command
cm_LeftEqualRight, cm_RightEqualLeft
we have these cm_TransferLeft, cm_TransferRight

- some are functionally present, but with NO internal command equivalent....
IMO these are the most urgent, since apparently the interest for an implementation was recognized, but for whatever reason are not realized to the full extent = internal command: ALT + F8

- some may indeed be missing as functionality...
in such cases a post with a review on the expected functionality is needed.... we should not expect the developer to guess the expectations of the community, but also is it possible for community to come to an agreement on the implementation?

- some can be further supported with links: ALT+F8 https://www.ghisler.ch/board/viewtopic.php?t=78782

- some may turn out to be complex and discussing them here would just make the talks on design on requirements / expectations bloated, when messed with other inquiries and random messages. These would be better off in a new discussion / separate topic.

I would suggest when this topic gains a good level of maturity, we change the caption with full names of the product, so these pop-up in the major search engines for people to be aware and be able to make their decision on detailed information and not just on advertisements.
Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *Fla$her »

igarny wrote: 2023-04-26, 11:58 UTCwhich are directly achievable through extended commands.
With regards of the list my suggestion is that easily achievable through extended command
Much of what is in the internal commands of TC can be easily achieved by other means, this doesn't mean that these commands need to be cut out of the program.
igarny wrote: 2023-04-26, 11:58 UTCwe have these cm_TransferLeft, cm_TransferRight
These are not analogs, besides DC has exactly the same ones. Sort it out properly first. Conduct experiments, read the descriptions for them.
igarny wrote: 2023-04-26, 11:58 UTCIMO these are the most urgent, since apparently the interest for an implementation was recognized, but for whatever reason are not realized to the full extent = internal command: ALT + F8
Don't get into demagoguery. You have your own urgency, the other has another.
igarny wrote: 2023-04-26, 11:58 UTCin such cases a post with a review on the expected functionality is needed....
See the link to the detailed descriptions at the bottom of the starting post.
igarny wrote: 2023-04-26, 11:58 UTCwe should not expect the developer to guess the expectations of the community, but also is it possible for community to come to an agreement on the implementation?
The DC and TC communities generally do not differ in their needs, so there is nothing much to guess, an agreement is also not required.
igarny wrote: 2023-04-26, 11:58 UTCsome may turn out to be complex and discussing them here would just make the talks on design on requirements / expectations bloated
There is already enough information about this above. There's not much to discuss here.
igarny wrote: 2023-04-26, 11:58 UTCThese would be better off in a new discussion / separate topic.
If you have time for this, you can proceed with the execution. I made the request with a list, just so as not to waste time on dozens of topics.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *ghisler(Author) »

Thanks for putting together this list. Some of these commands are indeed useful and easy to add, because they just call functions which are already there. For now I have added the following commands:
cm_DriveContextMenu
cm_OpenDriveByIndex
cm_QuickSearch / cm_QuickFilter (divides cm_ShowQuickSearch)
cm_ShowCmdLineHistory (like Alt+F8)
cm_AddFileNameToCmdLine
cm_AddPathAndFileNameToCmdLine
cm_RenameTab

==========================================================================
The following can be achieved in different ways:
cm_CopyNoAsk -> cm_copy will support parameters
cm_RenameNoAsk -> cm_renmov will support parameters
cm_ShellExecute -> just enter the command itself, or an em_xyz command
cm_ChangeDirToHome -> cd %USERPROFILE%
cm_LeftEqualRight -> cm_FocusRight,cm_MatchSrc
cm_RightEqualLeft -> cm_FocusLeft,cm_MatchSrc
cm_ActivateTabByIndex -> cm_SrcActivateTab1 index, e.g. cm_SrcActivateTab1 3

==========================================================================
The following are for functions not implemented in Total Commander:
cm_Benchmark -> better use a well-established benchmark program
cm_ShowMainMenu -> main menu cannot be hidden
cm_HardLink, cm_SymLink -> I'm reluctant to add these, they can can cause HUGE troubles in the hands of a not so cautious user
cm_Wipe -> I will not add this either, much too dangerous
cm_ViewSearches, cm_DeleteSearches -> TC doesn't keep track of separate search windows
cm_DebugShowCommandParameters -> no real usage
cm_ReloadFavoriteTabs, cm_ResaveFavoriteTabs, cm_PreviousFavoriteTabs, cm_NextFavoriteTabs -> TC doesn't used numbered favorite tabs
cm_ViewLogFile, cm_ClearLogFile -> use notepad.exe logfilename
cm_ExecuteScript -> call autohotkey

==========================================================================
I will probably add some of these, but they need new functions:
cm_CopyPathOfFilesToClip (not to be confused with cm_CopyFullNamesToClip)
cm_CopyPathNoSepOfFilesToClip
cm_SetAllTabsOptionNormal
cm_SetAllTabsOptionPathLocked
cm_SetAllTabsOptionPathResets
cm_CopyAllTabsToOpposite

==========================================================================
Are there any other TC functions which are already present but which don't have a cm_command, which you would like to see?
Now is the best moment to request them!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *petermad »

2ghisler(Author)
Are there any other TC functions which are already present but which don't have a cm_command, which you would like to see?
We have the commands
cm_Select=2936;Select file under cursor, go to next
cm_UnSelect=2937;Remove selection of file, go to next

It could be useful with a parameter to ONLY select/deselect the file WITHOUT going to the next file - so it works like pressing Space when SpaceMovesDown=0

It would also be useful with parameters 8 and 9 for the cm_SrcLong command (and maybe also for the other View commands like cm_SrcShort and cm_SrcThumbs) to remember the current view (8) and reinstate the remembered view (9) - similar to cm_SrcByName 8 and 9

It would be nice if the OPENBAR command could be aware of the "Show as menu" option.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2247
Joined: 2020-01-18, 04:03 UTC

Re: Internal DC commands, which are very lacking in TC

Post by *Fla$her »

ghisler(Author) wrote: 2023-05-01, 14:34 UTCI have added the following commands:
I will probably add some of these, but they need new functions:
Cool! :P
ghisler(Author) wrote: 2023-05-01, 14:34 UTCcm_LeftEqualRight -> cm_FocusRight,cm_MatchSrc
cm_RightEqualLeft -> cm_FocusLeft,cm_MatchSrc
I understand. But we have 3 dozen commands cm_Left ... and cm_Right ...
Why create them if it was easier to perform cm_Focus ..., cm_Src ...?
Besides, you still need to return to the source panel if the cursor was not in it, and for this you already need special tools like TCFS2.
ghisler(Author) wrote: 2023-05-01, 14:34 UTCcm_ActivateTabByIndex -> cm_SrcActivateTab1 index, e.g. cm_SrcActivateTab1 3
Oh, I didn't see that. Thanks for the hint! :)
ghisler(Author) wrote: 2023-05-01, 14:34 UTCcm_ShowMainMenu -> main menu cannot be hidden
We can't with TC itself yet. But above I gave the TCFS2 command that does this.
ghisler(Author) wrote: 2023-05-01, 14:34 UTCcm_HardLink, cm_SymLink -> I'm reluctant to add these, they can can cause HUGE troubles in the hands of a not so cautious user
In vain. Nothing can be worse than careless deletion by Shift+Del. These commands have been in demand for a long time. People are doing pretty well with NTLinksMaker.
ghisler(Author) wrote: 2023-05-01, 14:34 UTCcm_ReloadFavoriteTabs, cm_ResaveFavoriteTabs, cm_PreviousFavoriteTabs, cm_NextFavoriteTabs -> TC doesn't used numbered favorite tabs
I'd think about it if I were you. It is quite convenient and useful.

ghisler(Author) wrote: 2023-05-01, 14:34 UTCAre there any other TC functions which are already present but which don't have a cm_command, which you would like to see?
1. De/activating the menu (F9/F10)
2. Show context menu of TC window (Alt+Space)
3. Use an external viewer (F3/Alt+F3)
4. Invert selection of the object under cursor without moving to the next (Space)
5. The same thing, but without counting in the status bar (Alt+Shift+Up)
6. Open Quick Filter dialog and reactivate last-used filter (Ctrl+Shift+S)
7. cm_CopyToArchive and cm_MoveToArchive, but to the directory of the active panel
8. cm_OpenNewTabOther and cm_OpenNewTabBgOther
9. Add the file name under the cursor to the end of the command line (Ctrl+Enter)
10. Add the full file name under the cursor to the end of the command line (Ctrl+Shift+Enter)
Last edited by Fla$her on 2023-05-02, 13:28 UTC, edited 1 time in total.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *petermad »

1. De/activating the menu (F9/F10)
3. Use an external viewer (F3/Alt+F3)
4. Invert selection of the object under cursor without moving to the next (Space)
5. The same thing, but without counting in the status bar (Alt+Shift+Up)
Support++ - 4 and 5 could be done by adding parameters 1 and 2 to the current commands cm_Select and cm_UnSelect, as I suggested in a previous post.
9. Add the file name under the cursor to the end of the command line (Ctrl+Enter)
10. Add the full file name under the cursor to the end of the command line (Ctrl+Shift+Enter)
Support+
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *ghisler(Author) »

We have the commands
cm_Select=2936;Select file under cursor, go to next
cm_UnSelect=2937;Remove selection of file, go to next

It could be useful with a parameter to ONLY select/deselect the file WITHOUT going to the next file
These already support parameters 1 and above to select more than 1 file. I will support parameter -1 to not go to next, also for cm_reverse.
It would be nice if the OPENBAR command could be aware of the "Show as menu" option.
Show as menu only works from an existing bar. This wouldn't work if the user has disabled both the horizontal and vertical bar.
In vain. Nothing can be worse than careless deletion by Shift+Del.
There are undelete tools which work quite well - but not after cm_wipe.
TC doesn't used numbered favorite tabs
I'd think about it if I were you. It is quite convenient and useful.
But how? TC uses .tab files which can be stored anywhere.
1. De/activating the menu (F9/F10)
OK, I can add this, but it will not work when the user has pressed Shift, Ctrl, or Alt. Why? There is no command to focus the main menu. When the user presses F9, TC just sends WM_KEYDOWN/WM_KEYUP of the F10 key to itself.
2. Show context menu of TC window (Alt+Space)
There is also no command to focus the system menu (context menu is Shift+F10).
3. Use an external viewer (F3/Alt+F3)
OK, added.
4. Invert selection of the object under cursor without moving to the next (Space)
OK, will use cm_reverse -1 (see above)
5. The same thing, but without counting in the status bar (Alt+Shift+Up)
Hmm, I think that this is a bug, not a feature.
6. Open Quick Filter dialog and reactivate last-used filter (Ctrl+Shift+S)
OK, I will use cm_quickfilter 1
7. cm_CopyToArchive and cm_MoveToArchive, but to the directory of the active panel
I think I will have to add more parameters here, as for cm_copy.
8. cm_OpenNewTabOther and cm_OpenNewTabBgOther
OK, I will add them. Btw, there is already cm_OpenDirInNewTab and cm_OpenDirInNewTabOther.
9. Add the file name under the cursor to the end of the command line (Ctrl+Enter)
That's what cm_AddFileNameToCmdLine will do.
10. Add the full file name under the cursor to the end of the command line (Ctrl+Shift+Enter)
That's what cm_AddPathAndFileNameToCmdLine will do.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Internal DC commands, which are very lacking in TC

Post by *ghisler(Author) »

I'm wondering whether cm_CopyPathOfFilesToClip is really needed. There is already cm_CopySrcPathToClip. It does the same except when in branch view or when showing search results. But then there wouldn't be a common path for all selected files...
Author of Total Commander
https://www.ghisler.com
Post Reply