DOpus.GetClip behaviour

If I use Clipboard COPYNAMES=unc followed by somevar = DOpus.GetClip("text") the value of somevar always reflects the initial selection state in the source tab. This is true even after the selection has been changed and the tab has been updated. The attached JS code and screen grab demonstrate this. My initial state is that the second and third items are selected. As shown after executing the second Clipboard COPYNAMES command the value returned by GetClip still shows the second and third items as being selected whereas the first item is actually selected as per the screen grab.

Directory Opus 13.6.3 (Beta) Build 8909 x64 - OS 10.0 (B:22621 P:2 T:1) SP 0.0

function OnClick(clickData)
{
	// --------------------------------------------------------
	DOpus.ClearOutput();
	// --------------------------------------------------------
	var cmd = clickData.func.command;
	cmd.deselect = false; // Prevent automatic deselection
	// --------------------------------------------------------
	var src = clickData.func.sourcetab;
	cmd.runcommand("Clipboard COPYNAMES=unc"); // Initial selection to clipboard
	var initial = DOpus.GetClip("text");
	DOpus.output("INITIAL: "+initial);
	cmd.runcommand("Select NONE");
	cmd.runcommand("Select FIRST");
	src.Update(); // Update source tab to reflect selection changes
	cmd.runcommand("Clipboard COPYNAMES=unc"); // Updated selection to clipboard
	var updated = DOpus.GetClip("text");
	DOpus.output("UPDATED: "+updated);
	// --------------------------------------------------------
}

The command object gets its initial set of files from the selected items in the list when the command is run. You could do something like cmd.SetFiles(src.selected) to update it.

Ah yes, of course! Thanks @jon.