Page 1 of 2

Allow easy use of internal and user commands in Internal Associations

Posted: 2023-05-04, 16:07 UTC
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!

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

Posted: 2023-05-04, 16:42 UTC
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.

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

Posted: 2023-05-04, 16:49 UTC
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.

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

Posted: 2023-05-04, 16:54 UTC
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?

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

Posted: 2023-05-04, 17:16 UTC
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.

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

Posted: 2023-05-04, 17:25 UTC
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.

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

Posted: 2023-05-04, 17:37 UTC
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.

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

Posted: 2023-05-04, 17:56 UTC
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.

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

Posted: 2023-05-04, 20:01 UTC
by ghisler(Author)
I think it would be useful, I will check whether it is feasible.

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

Posted: 2023-05-10, 19:15 UTC
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.

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

Posted: 2023-05-11, 08:24 UTC
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.

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

Posted: 2023-05-11, 11:01 UTC
by Gral
Great, thanks!

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

Posted: 2023-05-11, 16:18 UTC
by petermad
You can also use:

Code: Select all

***cm_ListMulti
without %1, to open multiple files without having multiple windows.

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

Posted: 2023-05-11, 17:44 UTC
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.

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

Posted: 2023-05-12, 10:25 UTC
by ghisler(Author)
What should %2 do?