Viewer Select - Make file display track standalone viewer

Excellent, thanks.
Note that script doesnt work for me if images are in librarie.

I'd like a toggle in viewer preferences "Keep viewer in sync with the launching lister".

Root post updated with v1.2, fairly minor changes:

1.2 (22/Dec/2016):

  • Uses viewer.parenttab property introduced in Opus 12.2 as a better way to find the folder tab.
  • Slightly less overhead.
  • Fixed script log error message when viewing files in archives. (May need an Opus code-change to make the script work fully there.)

To make things easier to read, I've cleaned up the thread and removed completed discussions & thanks etc. (appreciated!), consolidating any extra info into the root post.

I noticed I hadn't really responded to these two comments, which got a bit lost in the others:

Is that still the case for you? I checked libraries while updating the script/post, and they seem to work OK for me.

There is an issue with archives, which Kundal reported, and I've added a workaround so it no longer triggers an error message. (Script still doesn't work in them, but won't cause problems in them either. I think we need to do a code change on the Opus side to make the script work fully within archives.)

For a toggle within Preferences, you can toggle the script itself under Preferences / Toolbars / Scripts.

You could also have a variable and a button which toggles it, and have the script look at the variable to see if it should do anything or not, if you wanted a toggle button/hotkey in the viewer or lister toolbars/menus.

Root post updated with v1.3. It's recommended you update the script, if you use it. The old version will stop working in Opus 12.3.3 and above.

  • 1.3 (09/Jan/2017):
    • Changed how the script works so that it is more reliable, and in particular works with files within archives.
    • These changes were also required to ensure the script still works with Opus 12.3.3 and above. Old versions of the script inadvertently depended on things which are being tidied up in the next Opus update.

3 posts were split to a new topic: Reuse existing viewer window

Came here because the version I used threw errors in the console all the time, it still was v1.0.
v1.3 does not anymore, thank you! o)

Took the chance to update by using (updated, yet unreleased) ScriptWizard, 1st real life test passed!
The tidy version information you provide here make this possible, thanks for that as well! o)

I'm running DO v12.6 (script requires min_version = "12.2" so I assume it should be OK) but I'm not getting any interaction between the "View in Directory Opus" viewer window and the lister window.

Using the "Viewer Pane" it seems to work as expected.

IE, selecting other items in the lister does not update the viewer…

The “viewer pane” works just fine though…

The script makes the file display track the file currently displayed by the standalone viewer window, not the other way around.

8 posts were split to a new topic: JScript Engine is broken on my machine

well, its works for me, Thanks,
But I am trying to add toggle with Show VIEWERCMD=selectfile,toggle But It's doesnt works.

VIEWCMD=mark,toggle is for toggling file marking. toggle doesn't do anything when combined with selectfile.

1 Like

Very nice and useful, especially if one wants viewer on a second monitor, where viewer pane does not seem to detach.
I tried creating a button with the code in fist post, but it does not work in latest opus version.
Anything i may be doing wrong?
Show VIEWERCMD=selectfile

That command still works in the latest version (checked with 12.20.2). It's part of the default viewer toolbar these days.

It should open (or bring to the front) a lister in the same folder as the viewer's current file, and select the file.

So, I press this button with the code above but the viewer does not follow selected files as you nice video shows, are there any other suggestions to get it working?

The video shows what the script does.

The alternative button does a lot less, but may be enough, depending on what you want.

I want a button ideally to make standalone viewer follow selected files in the Lister.
As I do not want this behavior always happening, if there is a way to toggle it on and off would be great.
I tried the script and it does the opposite. it selects fies the viewer shows.
Is there a way to get standalone viewer behave just like the viewer pane?
Or make the viewer pane able to detach to another place?

You could modify the script to check a variable which stops it changing the selection when set, and add a toolbar button to toggle the variable.

Or, without having to modify the script at all, you could add a toolbar button to the viewer which toggles the whole script between installed and uninstalled:

@ifexists:/scripts\Viewer_Select.js.txt
Rename /scripts\Viewer_Select.js.txt PATTERN * TO *_NOT
@ifexists:else
Rename /scripts\Viewer_Select.js.txt_NOT PATTERN *_NOT TO *

(That assumes it's saved as Viewer_Select.js.txt. It might be Viewer_Select.js, depending on how it was installed.)

Hello again, I tried this and standalone viewer still does not follow lister's selected images.

Have you actually installed the script?