Functions

Environment Variables in Icon Definitions

The icon file for a toolbar button can now be specified using environment variables (and path aliases).

 

@toggle command modifier

For buttons that act as toggles (e.g. Set VIEW=details), the @toggle modifier lets you change the highlight state of the button. Taking this as an example, ordinarily the button would appear highlighted when the File Display was in Details mode. If you specify @toggle:invert in the button definition, the button would appear highlighted when the File Display was NOT in details mode. You can also specify @toggle:disable to prevent the button from appearing highlighted at all.

 

@leavedoswindowopen command modifier

Commands that use this modifier (plus DOS commands run from the Find-as-you-Type field) now only internally pass the /K modifier to the command interpreter if cmd.exe is being used. If %ComSpec% is set to something other than cmd.exe, Opus will look for the optional %ComSpecLeaveOpenArg% environment variable, and use that as command interpreter if specified – otherwise %ComSpec% is used as-is without adding any arguments.

 

@resolvelinks command modifier

If this modifier is used in a command, any shortcut files that are passed to external programs will be resolved before they are used.

 

@ifset command modifier

This modifier allows simple conditional behaviour in a function, based on tests for various Set command conditions. For example, @ifset VIEW=details would cause any lines following that one in the command to be executed if the File Display was in details mode. @ifset:else lets you provide an “else” clause and @ifset:common lets you provide common instructions that are always executed.

 

User-Defined Commands

User-defined commands can now have a label that is separate to their name; the label is displayed if any user commands are added to the Jump List in Windows 7).

User commands also have a checkbox that makes them hidden in the Commands menu; this lets you create commands for the Jump List that aren’t shown elsewhere in the program.

 

File and Filem modifiers

The file and filem modifiers now take an optional q parameter (e.g. {file|filemq}) to force quoting of all filenames written to the file.