Is there a command in Directory Opus to clear the current selection?
Is there a command to select the current object (file or folder on which the caret is). What I want to do with this is to start a copy of the object the caret is on when I press F5 (like in Total Commander when you don't have to actually select an item you're caret-ing on when you want to copy it).
@script jscript
function OnClick(data){
data.func.command.RunCommand("Select THIS");
data.func.command.RunCommand("Copy");
}
Unfortunately, this requires me to press F5 twice in order to work. First, it selects the object, but does not copy. Pressing F5 again copies it. Ideas? .
The objects take a snapshot of things like the selected files at the start. If they change and you want the objects to use the new selections, you need to update them:
@script jscript
function OnClick(data){
data.func.command.RunCommand("Select THIS");
data.func.command.sourcetab.Update();
data.func.command.SetFiles(data.func.command.sourcetab.selected_files);
data.func.command.RunCommand("Copy");
}
It worked here on a toolbar button. I didn't try on a hotkey but it should behave in the same way, as long as there isn't another hotkey on the same thing (F5 is the standard hotkey for "refresh", so that isn't impossible).