November 8, 2022, 9:45pm
In the script below,
I want to remove the selected items in the destination-tab.
I often run
Select SOURCETODEST DESELECTNOMATCH
Please advise how to get it to work.
// Select *.* deselect
// Select postman.exe
November 8, 2022, 10:01pm
@ifpath and similar @modifiers are evaluated before any commands run, so it would be testing the source path not the destination one.
Using scripting would be better here, as you can simply tell Opus to run a command on the destination tab:
clickData.func.command.deselect = false;
var cmd = DOpus.Create.Command();
var dest = clickData.func.desttab;
var path = dest.path;
if (path.Root() && path == "coll://")
November 9, 2022, 10:23am
To not lose the selection, I'd rather use
var cmd = clickData.func.command;
November 9, 2022, 10:43am
That would get you the selection from the wrong side, I think.
November 9, 2022, 11:21am
Wouldn't the command object be empty?
Command object can be created by the method. By default, this object has no source, destination, files to operate on, etc. DOpusFactory.Command
November 9, 2022, 11:27am
The script works for me, so the
cmd.SetSourceTab(dest) seems to be sufficient to set up the command object, at least for the command being run.