Command line parameters for the buttons in the button bar.
Hi,
congratulations for the great program! I use it continuously for all of my day-to-day work. However, I recently stumbled into an issue.
I wrote a small program that accepts input file names from the command line. I call the program through the TC button bar by specifying %S in the "Parameters" field of the button configuration dialog. This works nicely if there are some files that are selected. However, if there are no files actively selected, TC still puts in the command line the name of the file that has the focus (dotted rectangle), which is not a desired behavior. Even worse, if no file has the focus, possibly because the user clicked on the command line field, TC still puts a file name in command line. On the other hand, if the user selects one file, but the focus is on another file on the same panel, then TC passes to the command line only the file that is selected, and not the one that has the focus. This behavior is a bit inconsistent. Is there a way of passing to the command line only the files that are actually selected (red)?
Thanks
S.
Button commands: Differ between focused and selected ?
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 2
- Joined: 2016-01-27, 16:01 UTC
Well, standard TC behaviour is to treat focused file as selected if there are no explicitly selected files. But if there are selected files, focused file is ignored.
These rules work in all TC commands, not only buttonbar buttons (e.g. copy/move/delete operations), when a command expects some file(s) for processing.
These rules work in all TC commands, not only buttonbar buttons (e.g. copy/move/delete operations), when a command expects some file(s) for processing.
-
- Junior Member
- Posts: 2
- Joined: 2016-01-27, 16:01 UTC
Hi MVV,
thanks for the quick reply. You're right, of course. Still, I find it inconsistent that a filename is passed to the command line even if no file is selected and no focus is active. It would be nice to have a switch in the button bar configuration dialog that allows to pass only selected files.
S.
thanks for the quick reply. You're right, of course. Still, I find it inconsistent that a filename is passed to the command line even if no file is selected and no focus is active. It would be nice to have a switch in the button bar configuration dialog that allows to pass only selected files.
S.