Ok, Christmas Eve family festivities complete!
Here’s what I had in mind for a script with a bit more coverage than Leo’s excellent starter script, simply based on being familiar with digital comics, from the scripts opening comments:
[quote=“steje”]The purpose of this script is to help Opus treat comic book archives with a user configurable file extension (commonly .cb7, .cbr, or .cbz) similar to how dedicated comic archive readers work, where double-clicking on the archive itself automatically starts displaying the comic book images inside the archive - but in this case, using Opus’ internal picture viewer.
For the script to work, Opus must ALREADY be configured to treat files with these extensions as archives (7zip, RAR, and ZIP respectively)…
The script also forces the use of the internal picture viewer when double clicking on images inside either an archive (if you’ve browsed inside it as a folder) or a real folder that has an extension which matches one from the configurable list of archive file extensions.
There is also an option to configure the list of image file extensions that the script will handle inside of archives and archive extension folders…
In addition to this primary behavior, the script also provides an option to specify a qualifier key that you can use when double-clicking on the comic archives to control if the script should do it’s job or not. By default, this option is set to “none”.
NOTE: the script has logic to handle the fairly common tendency for some comic book archives to contain a single child folder at the root of the archive, which in turn contains the comic images. If there are MULTIPLE items inside the archive root in addition to that single child folder, then it’s not clear what the “right” thing to do is.
If this turns out to be the case, the script will NOT attempt to figure something out and will instead just open the archive as normal - like a folder, at which point a variation on Leo’s original code for the request that generated this script will still let the Opus internal picture viewer open any images you double click on once you’ve found them manually inside the archive.
Either way, this also helps in case you want to have another application than Opus handle opening images outside of comic archives, but still like the Opus internal picture viewer for simple viewing and scrolling through comic book images…[/quote]
How to install and use it?:
The script is provided here as an Opus Script Package… which in turn is actually a zip file with the VBScript that does the work packaged inside.
ShowForComics.osp (2.56 KB)
It can be installed by either manually copying the OSP file to the /dopusdata\Script AddIns folder, or via drag-and-drop into the Preferences / Toolbars / Scripts page. As shown in the screenshot below, as well as mentioned above, the script has a set of configurable options: