If you are a photographer who does a lot of detailed photo-editing, it is extremely useful to be be able to view the before and after results of your efforts without the fag of having to have two Photoshop windows open.
The little script here will do just that. You select the two images you want to compare and they appear next to each other in separate Standalone viewer windows
To get the two viewer windows next to each other you will have to experiment with the minimum width window of the viewer to suit your video set-up. Although those who are much better at scripts that I am will no doubt be able to discover the right co-ordinate of the first window and place the second widow close to that co-ordinate.
Also depending on your video set-up you may need to edit line 34 of the script to set the left co-ordinate of the second window. (Unless you are clever enough to get the system to work it out for you)
I have found this little script saves me so much time.
The first picture always gets loaded twice. Delete the first ClickData.Func.command.Run to take care of this.
To have more control over the viewers, add SIZE to the Show command.
There is a slightly easier way to address the selected files
Function OnClick(ByRef clickData)
If clickData.func.sourcetab.selected_files.count <> 2 Then
Msgbox "Please select two files."
Exit Function
End If
For Each v in DOpus.Viewers
v.Command("close")
Next
ClickData.Func.Command.AddLine("Show """ & ClickData.Func.sourcetab.selected_files(0) & """ POS 3120,0 SIZE 1200,960 NOUSEEXISTING")
ClickData.Func.Command.AddLine("Show """ & ClickData.Func.sourcetab.selected_files(1) & """ POS 3120,960 SIZE 1200,960 NOUSEEXISTING")
ClickData.Func.Command.Run
End Function
@Ixp
Yes. I realised that the first picture was getting loaded twice, but I haven't had time to post a correction.
I take your point about the control of the viewer window, but as I use the feature solely for comparing before and after edits in portraits, I have found that if I set the viewer to FIT EVERY PICTURE and then give each picture a fixed width, it is ideal.
What would be nice would be to display the first viewer window, get the value of it top right co-ordinates and use them to display the second window, but as you will have gathered, writing VB is like drawing teeth for me, so I can't work out how to do it.
Up to now, on a single-monitor sysem I've just been opening two instances of the standalone viewer and flicking between their full-screen windows to compare. But maybe I'll give this a spin...
Here is a new version of the View Two Images button, with a correction to the problem of displaying an extra picture and the positioning suggestions from Ixp
Here is a new version of the View Two images macro. It contains far more robust error checking, but the functionality is the same. Feel free to adapt to your needs.