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

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

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

Post by *Slavic »

First of all, thanks for long-awaited option to assign several commands in a chain to a toolbar button in beta 3! However, UI can be improved to better support this option.

Currently, when we look for a particular command in the "Choose command" list and then insert it by "OK", the previous commands for current button, if they existed, become deleted. This makes difficult to add a sequence of commands by searching one-by-one in this UI.

I suggest to not delete the existing commands in the "Command:" field; user can do it on their own. Instead, insert the chosen command at the cursor position. This way, it will be much easier to add several commands to a chain.

Also, it could be helpful to check and add separating commas, if they are missed, but such service is very optional and can be implemented later.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

when we look for a particular command in the "Choose command" list and then insert it by "OK", the previous commands for current button, if they existed, become deleted
If there is a comma after the previous command AND the cursor is at the end of the Command field, then the new selected command get appended to the end.

It would be nice if the chosen command could also be inserted before commands that already exists in the field,
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

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

Post by *Slavic »

petermad wrote: 2023-05-17, 22:15 UTC It would be nice if the chosen command could also be inserted before commands that already exists in the field,
It's exactly what I tested, attempting to add a new command at the begin of chain (in particular, cm_FocusRight).
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

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

Post by *Fla$her »

Slavic wrote: 2023-05-17, 21:51 UTC First of all, thanks for long-awaited option to assign several commands in a chain to a toolbar button in beta 3!
What are you talking about?
HISTORY.TXT wrote:27.08.13 Release Total Commander 8.50 public beta 1 (32/64)
17.02.13 Added: Support for multiple internal (cm_xyz) or user-defined (em_xyz) commands on a single button or start menu command: Separate by a comma, e.g. cm_SelectAll,cm_Copy. Not all commands can be chained this way! (32/64)
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

Maybe he meant EM_COMMANDs with parameters?
Author of Total Commander
https://www.ghisler.com
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

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

Post by *Slavic »

ghisler(Author) wrote: 2023-05-18, 07:17 UTC Maybe he meant EM_COMMANDs with parameters?
15.05.23 Added: Button bar, start menu: Multiple user-defined internal commands with parameters can now be chained, e.g. em_notepad c:path\file1,em_notepad c:path\file2 (32/64)

(Apparently my phrase wasn't clear about exact addition, sorry about that)
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

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

Post by *Fla$her »

2Slavic
If you are writing about parameters, then you need to go to my topic.
Slavic wrote: 2023-05-17, 21:51 UTCfor long-awaited option
No one wrote a word in support. Is it implied that I alone have waited so long? :lol:
Overquoting is evil! 👎
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

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

Post by *Slavic »

Please look at the discussion a few years ago: https://www.ghisler.ch/board/viewtopic.php?t=72726
At that times, unlike now, the command like this didn't work:
cm_FocusRight,cd "c:\Windows\"
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

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

Post by *Fla$her »

2Slavic
You have given a line of history above regarding em_ commands. It doesn't say anything about cd etc. And in the rest of the lines of the history it is not written anywhere about it. This is apparently a side effect that you have stumbled upon. But this is good news!
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

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

Post by *sa16 »

Slavic wrote: At that times, unlike now, the command like this didn't work:
cm_FocusRight,cd "c:\Windows\"
More than a year has passed:
History.txt wrote:12.04.22 Release Total Commander 10.50 beta 1
08.03.22 Added: Button bar, Start menu: command "cd" can now be combined with internal commands, but the path must be in double quotes, e.g. cm_SrcShort,cd "c:\Windows" (32/64)
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

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

Post by *jinsight »

Support++ in support of the support by petermad
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

When you append a comma, the chosen command will already be put behind it. I will add the same when the existing command starts with a comma followed by an internal command or cd "path".
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

2ghisler(Author)

It is still not possible to insert cm_commands between or before existing commands via choosing the command from the "Choose Command" dialog - trying to insert a command deletes all other commands - it is only possible to append commands at the end.

In the "View Modes" -> "Auto-run commands" field trying to insert a command via the [+] button, just appends it, even without adding a trailing comma first. Same thing with the "Lister: view methods by file type" when using the [+] button to add Lister view modes

It would be nice if all these dialogs supporting insertion when the cursor is placed right after a comma. It would be OK if the user had to add an extra comma manually and place the cursor between those two commas, to indicate where the insertion is wanted.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) »

Just append the command then then use cut+paste.
Author of Total Commander
https://www.ghisler.com
Post Reply