Allow easy use of internal and user commands in Internal Associations

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Allow easy use of internal and user commands in Internal Associations

Post by *Gral »

As now if we want to use internal or user command in Internal Association we must use some scripts, external programs or other tricks.
Make it easy e.g. by small additional program (always included) or mark e.g.

Code: Select all

Filter1_external viewer=***cm_listExternal
P.S. Please don't post advice e.g. "you can define here external viewer directly" - it's jest example!
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

Gral wrote: 2023-05-04, 16:07 UTC As now if we want to use internal or user command in Internal Association we must use some scripts, external programs or other tricks.
Make it easy e.g. by small additional program (always included)
That is, the difference will be only in the presence of this small program in the distribution? I think it's pointless.
If there is a need to add such an opportunity, then definitely without any addons.
And I support the native supplement. Here it was discussed in different topics.
Overquoting is evil! 👎
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Gral »

The solution with a small additional program has its advantages - it can be implemented at any time, as well as it could be applied to older TC versions. Imagine - just prepend any command with e.g. "TCcommand" or something similar. For future versions of TC of course internal solution is preffered.
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

But you can use TCMC and TCFS2 anyway. Why don't they suit you? Just because they are not included in the distribution?
Overquoting is evil! 👎
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Gral »

I don't just think about myself. Despite used TC for over a quarter of a century, I always imagine how to make it easier for new and less experienced users.
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

Somehow unconvincing. This is about the same as asking to add some plugin to the distribution so that TC as a whole becomes more usable for some other users.
Overquoting is evil! 👎
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Gral »

I do not agree. Take a look at the NOCLOSE program, an external small program included with the TC but the Shift+Enter function is an internal solution.
Plugins are something different though.
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

NoClose itself is needed for third-party console programs, plus because of the difference in interfaces there was no other way.
And here you offer something that can be done there without any addons.
And then your thesis "it could be applied to older TC versions" doesn't fit into the logic of caring about other users. If someone needs to use the old versions for some reason, then they can easily use the existing utilities.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Allow easy use of internal and user commands in Internal Associations

Post by *ghisler(Author) »

I think it would be useful, I will check whether it is feasible.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

HISTORY.TXT wrote:10.05.23 Added: Internal associations now support internal commands, e.g. OPENTABS %1, or ***cm_list %1, which will open Lister with current file on ENTER, or all selected via context menu (32/64)
Great! Now utilities are not required. :) %1 is not really needed here.
Please explain what to specify in the "Action (verb):" field? And how to work with %2?
I tried open() with ***cm_List "%2", nothing came out.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Allow easy use of internal and user commands in Internal Associations

Post by *ghisler(Author) »

The parameter %1 does make a difference when multiple files are selected!
When you right click and choose the command, it will open all selected files with e.g. cm_list when you added %1.
Otherwise it will only open the file on which you right clicked.
Author of Total Commander
https://www.ghisler.com
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Gral »

Great, thanks!
User avatar
petermad
Power Member
Power Member
Posts: 16001
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Allow easy use of internal and user commands in Internal Associations

Post by *petermad »

You can also use:

Code: Select all

***cm_ListMulti
without %1, to open multiple files without having multiple windows.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Allow easy use of internal and user commands in Internal Associations

Post by *Fla$her »

ghisler(Author) wrote: 2023-05-11, 08:24 UTC The parameter %1 does make a difference when multiple files are selected!
When you right click and choose the command, it will open all selected files with e.g. cm_list when you added %1.
wincmd.ini: Viewertype=1, i.e. %1 or cm_ListMulti is not required.
That's not what I asked. I don't need to switch files in the Lister by N/P. It's about opening in every window or tab (I use tlister). I asked about editing a specific field and %2. Please answer these questions. Besides cm_List, there may be other commands.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Allow easy use of internal and user commands in Internal Associations

Post by *ghisler(Author) »

What should %2 do?
Author of Total Commander
https://www.ghisler.com
Post Reply