Specify two files as parameters to buttons

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
AlexF
Junior Member
Junior Member
Posts: 23
Joined: 2004-10-05, 10:15 UTC

Specify two files as parameters to buttons

Post by *AlexF »

I have added a 3rd party tool (in my case, ExamDiff) in Toolbar which takes two parameters on command line.
Currently, no matter how many files I have selected, when I drag them into this tool on the Toolbar, only the first one is used as the parameter and the second one is ignored.
How can I tell TC that I want both selected files to be used as command line parameter for the tool?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Apparently Drag & Drop currently work only with the first selected file.

Neither a listfile nor moire than one files are passed. I did check this with Process Explorer.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

AlexF
You can use lst2str program to convert the list of selected files (%L) into one command line. But in this case you should not drag&drop them but just select the files needed and press the toolbar button.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

AlexF

Oh sorry, I mixed you up. So I rather took this as bug-report that a request for advice.


To get ExamDiff to work you can use Parameter: %N %M
what will open the files under the Cursor in source and target panel. Although only by clicking the button but not with drag & drop.

In other cases there may be a command line option to open the files from a list. E.g. with TextPad you can specify @%L (instead of %L) and it loads all files from Listfile passed by TC.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
AlexF
Junior Member
Junior Member
Posts: 23
Joined: 2004-10-05, 10:15 UTC

Post by *AlexF »

Sheepdog, thanks for advice... If I use "%P%N %T%M" then this works. However, this seems limiting to me - what if my Toolbar program needed three or more parameters, then the Source/Target variables wouldn't work. Neither does this work at all of both of my files are in same (Source) windows.
I don't understand this silly limitation in TC, why not construct command-line with selected files as parameters?
User avatar
nsp
Power Member
Power Member
Posts: 1806
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

I also think that the Button is not fully featured :
for drag and drop it's should create a list if a %lLdD is defined in the parameters.
Add all the file replacing %F by a sequence of dragged files even adding automatialy the editor box like for the ?parameter.
it is also missing a way to get file list from target, get a list for all seleted file source + target.
It could also be nice to have all selected file from all Left Tabs, all Right Tabs an All tabs at once.
User avatar
WatchUer
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-22, 10:46 UTC
Location: China

Post by *WatchUer »

nsp wrote:I also think that the Button is not fully featured :
for drag and drop it's should create a list if a %lLdD is defined in the parameters.
Add all the file replacing %F by a sequence of dragged files even adding automatialy the editor box like for the ?parameter.
it is also missing a way to get file list from target, get a list for all seleted file source + target.
It could also be nice to have all selected file from all Left Tabs, all Right Tabs an All tabs at once.
Support all! :)
Post Reply