File selected by script action not shown in viewer

The following code snippet..

var objCmd = DOpus.create.command; var target = "C:\\Relay\\Test Folder\\Clock.JPG"; cmdstring = 'Go "' + target + '" NEW=source,viewpane'; objCmd.runcommand(cmdstring);
..does most of what I expect but the correctly selected file is not displayed in the viewer until I actually click on it.

Regards, AB

This should work:

[code]function OnClick(clickData)
var folder = "C:\Relay\Test Folder";
var file = "Clock.JPG";

var objCmd = DOpus.Create.Command;
cmdstring = 'Go "' + folder + '" NEW=source,viewpane';
objCmd.RunCommand('Select EXACT SETFOCUS "' + file + '"');


Thanks. Interesting that it has to be performed in two distinct operations.

Regards, AB

P.S. I should probably have posted this in the Script and Plugin Development forum. Feel free to move it.