GP Software β€’ Twitter
Opus FAQs β€’ Manual β€’ Commands β€’ Objects

Compare Images Close Button Help

I quite like using the compare two images button I found here. Display two pictures side by side in Standalone viewer
The problem I'm having is with the close button provided. While it works great to close both images, it also changes the open lister size from maximum window to adjustable size. I can increase the adjustable window to keep the large lister, but I would prefer that it maintain the full size lister after I use the close (both images) button. It's a minor annoyance, but I enjoy learning about scripts so your assistance will be appreciated.

Function OnClick(ByRef clickData)
Dim v
For Each v in DOpus.Viewers
	v.Command("close")
Next
	ClickData.Func.Command.AddLine("SET ListerCMD=Restore")
	ClickData.Func.command.Run
End Function

A simple command button is all you need

Close ALLVIEWERS

β€œThe definition of genius is taking the complex and making it simple.”

― Albert Einstein

Thanks!

2 Likes

Here is another wrinkle find very useful with the Opus viewer:

I like to use the viewer in conjunction with a Lister so that I can get a more detailed view of an image than the small Opus viewer gives me.

To this end I have written a macro that opens the selected image next to the Thumbnail Lister it comes from. The macro adjusts the size of the Lister to allow the image to display in the viewer no matter whether it is portrait or landscape.

When you close the viewer the Lister is returned to the fixed size I like for my screen.

Obviously that size of the lister is very easy to adjust in the vb macro to whatever you want.

Very useful if you are a photographer who needs detailed views of images without opening Photoshop.

Open In Viewer.dcf (3.9 KB)

I added the modifier to hide the compare two images button when nothing is selected. Now I would like to hide the close button unless I have two images displayed. I tried the same modifier as the other button, but it didn't work. Again, thanks for writing the script.

Not quite sure why you would want to close the "CLOSE" button the viewer. Surely You would have to press the X then in Windows to close it.

The close button on the macro simply loops round closing all open viewer windows. It does not care if there are 1,000 open viewer windows or just one.

The viewer in the macro is simply the Opus viewer with this modified close button.

I don't think there is a modifier that checks for open viewers. But you could move the button directly to the standalone viewer. I use this version:

@keydown:none
Show VIEWERCMD=close

@keydown:shift
Close ALLVIEWERS 

Or display just the icon if you want to save screen real estate.

BTW: Hitting Esc also closes the viewers. Might be even faster.

You could make the button hidden unless a variable is set, then have the script which opens the two viewers set variables in both of them so only they show the extra button.

That'll be easier to do in the next update, since we're making it easier for scripts to get handles to any viewers they open.

FWIW

This is how I close the Viewer window and it takes a few pixels of toolbar space

Writing macros to have the button appear and disappear seems like a lot of trouble to save such a small space.

This is the button for completeness:

Close.dcf (943 Bytes)

Auden, you are quite right. It was a silly idea. I get caught up in the seemingly limitless ability to modify Do and when I discover something new I try to extend it to something that really doesn't need to be changed without thinking it through. I did change the close button to the small red icon. :opustick:

No worries. You are suffering from DOpusitis, a relatively common complain, easily treatable with an ice-pack to the right temple and a few days of complete bed rest . You must also spend two hours a day using Explorer. You'll be on your feet in no time.

1 Like