This is a beta release. It may be unstable. Documentation may be incomplete. Some text may not be translated yet. Use at your own risk!
Download manually, or use Help > Check for Program Updates (if beta versions are enabled in Preferences / Internet / Updates).
Commands
- Added
Select FILTERFLAGS=showhidden
flag, allows any currently hidden items to be redisplayed before the new filter is applied. - Added
Select FILTERFLAGS=deselectnomatch
flag, allows any currently selected items to be deselected if they don't match the new filter.
Scripting
-
Script commands can now be used to add dynamically-generated buttons to toolbars and menus. Buttons that invoke script commands can also now enable context sensitive state (checked and/or enabled state can be modified by the script).
An example script which adds a dynamic menu-button:
Find-As-You-Type (FAYT) scripts - #2 by LeoTo add dynamic buttons the
dynamic_args
property of theScriptCommand
object needs to be initialised with a string containing the (comma-separated) argument names that can be used to generate dynamic buttons.For example, a function called
Foo
might have an argumentBAR
that's used to generate a number of buttons (e.g.Foo BAR
). You would therefore setdynamic_args
to the valueBAR
.To allow context sensitive state the
context_args
property performs a similar function.In both cases, you can set the property to
*
to indicate that all (or no) arguments are required.A script then needs to implement the
OnAddButtons
method (for dynamic buttons) and theOnButtonContext
method (for context sensitivity).OnAddButtons:
OnAddButtons
is called to add dynamic buttons. Any buttons it creates will be displayed in place of the original button, and the original button will be hidden (except in Customize mode). The method should returntrue
if it has added buttons, or if it doesn't add any buttons but still wants to hide the original button.The
OnAddButtons
method receives anAddButtonsData
object as its argument. The properties of this argument are:cmdline
- provides the command line being used to generate the buttonsmethod
- provides the command method nameembedded
- provides the embedded function body if given by the userbuttons
- returns anAddButtonHelper
object that is used to add buttonsargs
- returns anArgs
object representing the function's parsed arguments
The
AddButtonHelper
object has the following methods:AddButton
- adds a buttonAddThreeButton
- adds a three-buttonAddMenu
- adds a menuAddMenuButton
- adds a menu button
Those methods all return a
ButtonData
object which is used to initialise the button via a number of properties. Most properties are optional and only need to be provided if you want something other than the defaults.The properties common to all types are:
label
- the button's labeldesc
- the button's description (tooltip)image
- the button's primary imageimage2
- the button's secondary imagetextcol
- the button's text colorbackcol
- the button's background colorshowlabel
- controls the button label visibility. Valid values are true/false, "left", "right", "top", "bottom".showimage
- controls the button image visibility. Valid values are true/false, "dual", "large", "largedual"nohighlight
- don't highlight the button on mouseoverseparator
- display a separator after the buttonnotablabel
- don't interpret tabs in the label
For normal buttons and menu buttons, the following properties are available:
type
- function type; valid values are "batch", "script", "wsl". Leave empty for a standard Opus function.func
- the function to run. Multiple lines can be provided, with cr/lf separators. Any
@modifiers
need to go at the top of the function.checked
- set to true to have the button appear checkedradio
- set to true to use a radio button rather than a checkmarkdisabled
- set to true to disable the button
For menus, menu buttons and three buttons, two properties are available to configure child buttons.
children
- this returns anotherAddButtonHelper
object, which lets you add child buttons to the menu. Note that for three buttons, the first button is designated left, the second is right and the third is middle.childimages
- controls the visibility of images in the menu. Valid values are "off", "on", "large".
For menus, the following properties are available:
popout
- control where the menu pops open. Valid values are "left", "right", "top", "bottom"
arrow - display a dropdown arrow on the menu. Valid values are true/false, "normal", "slim"minimize
- set to true to minimize the menu width
For three buttons, the following properties are available:
dynamicfromchild
- enables dynamic icons/labels for the button parent based on the child buttons
For menu buttons, the following properties are available:
alwaysenable
- set to true to always enable the dropdown even if the button itself is disabledholdright
- set to true to enable hold/right button to pop open
OnButtonContext:
OnButtonContext
is called to allow a script to selectively check and/or disable buttons that invoke its functions. The method should return true to update the button's appearance.OnButtonContext
receives aButtonContextData
object as its argument. The properties of this argument are:cmdline
- provides the command line being used to generate the buttonsmethod
- provides the command method namectx
- returns aButtonContext
object that is used to change the button's stateargs
- returns anArgs
object representing the function's parsed arguments
The
ButtonContext
object has the following properties:checked
- set to true to have the button appear checkedradio
- set to true to use a radio button rather than a checkmarkdisabled
- set to true to disable the button
Updating dynamic buttons
The new
Script.UpdateButtons
method can be used to force any dynamically-added script buttons to be refreshed. It takes a single bool parameter. Set to false to only refresh context sensitive state; set to true to also refresh dynamic buttons.
Other changes
- Added "Ignore filename extensions" option for Filter Bar and FAYT in filter mode.
- Inline rename control keys can now be individually hidden from the tooltip that appears when holding the control key down.
- Improved how the command editor finds a lister to test-run against when the command isn't from a lister toolbar; for example, when testing a User Command. If available, it will use the lister which opened the Customize dialog; failing that, it will fall back on the last active lister.
- Duplicating a user command in the Customize dialog now bases the default name for the duplicate on the name of the duplicated command.
- In script dialogs, the
DialogListItem.icon
property can now load icons for non-filesystem paths (e.g. from a collection or library path).
Fixes
- Fixed CLI ignoring left cursor key that should clear a selection which starts on the first character of the line.
- Fixed inline rename control key tooltip overlapping the edit field when close to the bottom of the screen.
- Fixed text/hex viewer plugin not respecting the hex font setting.
- Fixed
Toolbar NAME=*this
not working with floating toolbars. Toolbar NAME=*this
now works correctly in a floating toolbar even ifSTATE=float
(orFLOAT
) hasn't been specified.- Fixed
linkcount
value not working reliably in evaluator columns. - Added workaround for delay during drag & drop in some situations.
- Fixed Metadata Editor's Tags field not switching into "Multiple Values" mode if two files were selected where the 2nd file's tags were a superset of the first's.
- Fixed issue with a function that runs two
Copy AS
commands to make two copies of the same file. - Opus no longer blocks Chrome.exe from loading its DLLs. A reboot may be required for this to take effect. This fixes a compatibility problem where File Save dialogs had long delays in some versions of Chrome, and the original reason the block was introduced no longer applies to current versions of Chrome.
- Fixed elements that render multi-line markup text drawing two lines on top of each other if the first line ended exactly on a closing tag.
- Fixed issue with the copy queue overlay icon being left behind after a function that runs
Copy {filepath$} AS...
- In the image viewer,
Show VIEWERCMD
toolbar buttons that use {} insert codes (e.g. to modify the command with the evaluator) now work properly.