Select/Highlight Currently Displayed Image From Image Viewer

Agree, however the "guess" case then is the exception and not the regular case. So a valid sourcetab would render things robust and designful (what a nice word you have here? o).

I agree, but what about the nearest thing, binding to the "Show VIEWERCMD=close" entry on the toolbar?

Checked: I indeed have "left mouse" set to be "Select Clipboard Region", changed it to run a blank command -> still works as "Select Clipboard Region". Bugglet? Entering a dummy command or "//" fixes that.

I guess without the option and intent to define custom hotkeys, it's quite clear that nobody really tried and complained, hu? o)

Many users and software companys think different about that I guess. is the first thing I press, because so many do it that way. It's similar to the thing it seems. Why can't be connected to the "Show VIEWERCMD=next" command from the toolbar so it's consistent with other key definitions and available for customization?
I see that some additional preferences controls/options would be necessary to setup the keys people like to use for dragging, selecting region etc., but you also did that for mousebuttons so you are obviously aware of different user preferences here. Using or any other non-qualifying key is probably harder to code to be used for dragging etc., but you can make it! o)

Tested again and confirmed. Regular hotkeys work, testing qualifiers does not. Don't remember how things behaved in a regular lister, if that is equal as you say, then fine - something we seem to get along with. o)

Isn't "Listers" your collection? When reading through the docs of the DOpus object, it tells me there is Listers.Update() and Listers.LastActive() method, so it's not entirely native and probably worth its own section? Just thinking, because I was looking for LastActive() exactly and expected to find "Listers" or something, then pulled up the search and found things to be mentioned elsewhere only.

See the FAQs, bottom section. :slight_smile:[/quote]
:blush:

Anyway, I took the dive and finally upgraded to the Opus 12 beta. And yeah all those script including mine works!! So happy now. :smiley:

Thank you leo, tbone, and leo! Anyway I will continue to silently follow this thread since it looks like tbone wants to add some more smartness or function to it. Well I will also do some more exploration with the scripting functions.

Last note, does Directory Opus has a lock on any other files outside of its install directory? Because I noticed that every single time I upgrade it, I had to restart the computer. I already check using tools to make sure there are no locks on any files in the install directory and to make sure the tray icon for Opus is closed. Yet it still required a restart. I had tried simply running it and ignoring the restart message but it does not work. It's a tad annoying at times especially when you have many important programs opened.

Somewhat off-topic for this thread, but it is not Opus locking files outside of Opus; it is Windows and other programs locking Opus's files. There is no reliable way to replace a DLL which other programs have loaded as a shell extension or hook, other than rebooting.

The shell / desktop / taskbar can be restarted these days (although doing so often crashes other tools that don't expect it), but isn't the only thing that locks the DLLs, and there's usually some program or other that doesn't support automated restarting. Microsoft didn't think ahead to provide a mechanism to request unload & replacement of shell extensions and similar DLLs.

In the next beta we'll add the command Show VIEWERCMD selectfile which will hard-code this function in (select the currently viewed file in the original tab).

For scripting, we'll also fix it so qualifiers are passed through to the OnClick function when run from the viewer, and make the source tab handle available as suggested above.

Nice to hear you go 2-way here, fully supporting command and scripting. o) Anything up regarding the keyboard things?

What happened to your avatar Leo? Are you serious? o) I just got used to the "new" one with the face! o)

Hmm, now that you've mentioned it... :slight_smile:

Over in the german forum, a user wants to refresh the list of images the viewer determined when it opened.
Kundal came up with this and it's reported to work. o) "F5" in the viewer to refresh the list is something I also thought of, so very nice! o)

function OnClick(data){ var curItem = data.func.viewer.current; data.func.command.RunCommand('Select DESELECTNOMATCH EXACT MAKEVISIBLE "'+curItem.name+'"'); data.func.command.RunCommand("Show VIEWERCMD=close"); data.func.command.RunCommand("Show LISTSIBLINGS"); }
Now it would be nice to know if the viewer in fullscreen mode or not, when re-opening it.
I digged through the release notes and found following syntax (mentioned in conjunction with @ifset only though).
It does not work, it always gives "false", is it me doing something wrong or is it expected to not work the way I thought?

var isFull = cmd.IsSet("Show VIEWERCMD=fullscreen");

IsSet takes one or two arguments.

If only one argument is given, it assumes you're testing arguments to the Set command. (This used to be the only thing IsSet could do, and the only way to call it.) So IsSet("Show VIEWERCMD=fullscreen") is effectively testing Set SHOW VIEWERCMD=fullscreen (which won't work, of course).

If two arguments are given, the first is the command and the second is the arguments to test.

Here's how to do it (verified working with 12.0.4):

var isFull = data.func.command.IsSet("Show","VIEWERCMD=fullscreen");

Ok, that works indeed! o)
Adding "FULLSCREEN" or not to the "Show" command only makes a difference if "Preferences / Viewer / Appearance / Auto-size viewer window" is not enabled or at least not set to open fullscreen. I had that enabled, so a missing "FULLSCREEN" switch would still re-open the viewer in fullscreen mode. To get around that, I disabled that option and added "FULLSCREEN" to the "Show .. " command in the double-click filetype definition for images. Will see how that might effect other situations I currently can't think of, but for now, working nicely. o)

Thank you! o)

[quote="jon"]In the next beta we'll add the command Show VIEWERCMD selectfile which will hard-code this function in (select the currently viewed file in the original tab).

For scripting, we'll also fix it so qualifiers are passed through to the OnClick function when run from the viewer, and make the source tab handle available as suggested above.[/quote]
Oh! Sorry somehow I missed this post. Anyway thank you very much for this function! It's awesome! :smiley: :thumbsup: