Page 2 of 2

Re: Allow add/insert a command to chain for button from Choose command UI

Posted: 2023-07-14, 10:22 UTC
by petermad
Just append the command then then use cut+paste.

That is what I do in "View Modes" -> "Auto-run commands" dialog. In the "Change single button" dialog I right-click on the command in "Choose Command" and choose "Copy as text" and then paste it in the command field - but both ways are inconveniant - and defies having the "Choose Command" dialog - I can just as well cut-and-paste from totalcmd.inc / usercmd.ini then - which I often do.

Re: Allow add/insert a command to chain for button from Choose command UI

Posted: 2023-07-14, 21:23 UTC
by hi5
At some point keeping it "it has always been this way" (a single input control) causes more trouble than it might be worth, "script editors" in other programs offer a "line based action" approach which you can remove, insert, move up/down actions etc.

So perhaps keep it as is for those used to it, but offer a "Command Editor" for more complicated chain / those preferring more visual feedback preparing their "chain of commands" - here a mockup where I added a [+] button after the "search command" button, in the mockup it would open a new Gui as a child window similar to the "Directory menu editor" where you can add/remove items in order - there would need to be a "translation" of

cm_SelectAll,cm_Copy

to

cm_SelectAll
cm_Copy

and reverse it when saving it back into the single line input control:

https://raw.githubusercontent.com/hi5/_resources/master/commandeditor.png

(this is of course a quick mockup/example - but a picture is worth a 1000 words sometimes)

Edit:

A somewhat related suggestion: At the moment everything is stored in INI format, which brings some limitation with readability/edit friendlyness

Why not introduce a "Total Commander Command Chain Script" format (MyTCScript.tccs files) which are "just" text files with one command per line, similar to INI but easier to edit

So in Ini format it currently is

Code: Select all

cmd=cm_SelectAll,cm_Copy
in the script file it would be

Code: Select all

[name of script]
cm_SelectAll
cm_Copy
the .tccs would be an internal association executing the script similar to batch files and the command in a button would simply be the path to the .tcss file - the editor as shown above would be able to be used from within TC or you can use your preferred editor.

Re: Allow add/insert a command to chain for button from Choose command UI

Posted: 2023-07-15, 10:55 UTC
by petermad
2ghisler(Author)

This posting https://ghisler.ch/board/viewtopic.php?p=437200#p437200 shows why adding the functionality of inserting commands via the GUI is needed.

Re: Allow add/insert a command to chain for button from Choose command UI

Posted: 2023-07-15, 11:18 UTC
by HalbschuhTouri
Support ++++, including @petermad's additional requests/elaboration.

Re: Allow add/insert a command to chain for button from Choose command UI

Posted: 2024-11-04, 01:16 UTC
by petermad
Bump*