Total Commander 7.55ß - %S parameter in Button Bar / Menu

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Akira
Junior Member
Junior Member
Posts: 3
Joined: 2010-04-13, 06:25 UTC

Total Commander 7.55ß - %S parameter in Button Bar / Menu

Post by *Akira »

According to help file %S parameter denotes selected files as parameters when launching through buttonbar or menu. When I launch VLC for instance through the buttonbar giving %S parameter the program receives parameters even when nothing is selected in the panels.
It would be better having %S empty in case nothing is selected.
Regs - Akira
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Even if no files selected you have the focused one - and it is the selected one (all operations take focused file if no selected files). You should put focus onto ".." item if you don't want to pass focused file to program.
Akira
Junior Member
Junior Member
Posts: 3
Joined: 2010-04-13, 06:25 UTC

Post by *Akira »

I agree that it is now like you describe it.
Simply if I want to use focussed file I can use %N parameter as described in help file.
Or I can use %N %S if I want to pass the selected and the focussed file to the program. In this case the program receives twice the same parameter if the focussed file is the same as the selected file.
There is no obvious reason to me why selected file %S defaults to focussed %N when nothing is selected in the active panel.
It is rather annoying since I can't launch a program by itself and I always must take care of what is focussed before launching a program. No way to launch with only selected stuff as described in the help file. Unless there is a parameter I am not aware of which can do this.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

For now I may suggest only one thing - you may add ? characher before command line parameters in button's properties - so TC will ask you for params when you click button. And, if you wish to start program w/o params, just press Delete to erase text and then Enter to start program w/o params.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed it's not a bug, %S will pass the files which are handled in functions like F5 copy or F8 delete.
Author of Total Commander
https://www.ghisler.com
Akira
Junior Member
Junior Member
Posts: 3
Joined: 2010-04-13, 06:25 UTC

Post by *Akira »

It makes sense for copy & delete. Its not a bug, its a feature.
Maybe one of the moderators can shift the whole thing to the feature request section please.
I would like to propose to have a new %<what-ever-letter> which is like %S but empty if nothing is selected in the active panel.
The workarounds are ok but I am simply too lazy to start thinking about what I have to focus, click or not before launching a program. I'm gonna try to check an external cmd handler to see if this can do the job.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Maybe you may append some prefix to %S so it will hurt first parameter so your player will need to skip it? E.g.:

Code: Select all

/xxx%S
(first filename will get prefix /xxx)
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the TC 7.55 Suggestions forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply