Command Changes
- CLI SCRIPTMODE
This commands displays the CLI in Script Mode, which provides a
simple way to enter and test scripts.
- Go FDBBUTTONS
The new Go
FDBBUTTONS command lets you add buttons to a toolbar that mimic the
standard File Display Border buttons. This command is designed to be
used on the new File Display Border toolbar as an alternative to the
standard
buttons.
Standard
buttons Toolbar
buttons
To use the command you would normally disable the
standard buttons using the options on the Preferences / File Display /
Border page, and then add the Go FDBBUTTONS command
with the desired arguments to the file display toolbar.
- Go NEWTAB
The Go NEWTAB command
now supports embedded functions to run
a function in the context of the newly created tab.
- Go WHENDUAL
This works in conjunction
BACK, FORWARD and UP and is
designed to be used with "app commands" like the Back button on a
mouse. Go BACK WHENDUAL=checkmouse in a dual display will
cause the command to act on the file display under the mouse pointer rather
than the source file display. Specifying the deffocus
argument as well will fall back to the old behaviour and act on the source if
the mouse pointer isn't over either file display.
- Image LOCATE
The Image
LOCATE command now supports Bing Maps (Image
LOCATE=bing) and Google Maps (Image
LOCATE=google) as well as Google Earth (Image
LOCATE=googleearth).
- Properties SETLABELINFS
This new argument lets you
assign labels to files that are specifically stored in the file-system or in
your Opus configuration (overriding the setting in
Preferences).
- Select FROMSCRIPT
The new Select
FROMSCRIPT command is used from a script to select files in the file
display. It lets you build a list of files using the script
Command object and then run the Select
command to select based on the files in that
object.
- Set CALCFOLDERSIZES
The new Set
CALCFOLDERSIZES command can be used to change the state of
the Preferences / Folders / Folder Behaviour / Calculate folder sizes
automatically option.
- Set DUAL
The Set DUAL command can
now combine the Toggle, Horiz /
Vert and ToggleLayout arguments, to create a button
that turns on dual-display mode in the desired orientation if it's not on,
switches the layout (from horizontal to vertical or vice versa) if
dual-display is already on but not in the desired orientation, and closes
dual-display mode it if it is on and already in the desired orientation. The
new buttons on the default Menu toolbar make use of this.
- Set ENABLELABELFILTER
The new Set
ENABLELABELFILTER command allows label filters (wildcard and filter
based) to be turned on or off. You must assign a name to the label filter in
order to control it via the command line. Both global and Folder
Format-based filters are supported. You can specify
local:<name> and global:<name>
to restrict the type of filter you want to control, or just provide the name
and Opus will look for it in both types of filter.
- Set FOCUS
The Set FOCUS command
now lets you assign the focus to the path field control (assuming there is one
on your toolbars). Set FOCUS=PathField will set the focus to
the source path field - in a dual-display Lister with dual path fields (i.e.
in the file display toolbar) you can also specify LeftPathField
and RightPathField.
- Set LISTERTITLE
Added codes to Set
LISTERTITLE to get the left/right paths (as opposed to
source/destination paths):
%1 -
left path
%2 - right
path
%3 - left folder
name
%4 - right folder
name
- Set SHOWMILLIS
The new Set
SHOWMILLIS command lets you toggle the display of milliseconds in
file time columns on or off. Note that seconds must also be displayed for this
command to have any effect.
- Set SHOWSECONDS
The new Set
SHOWSECONDS command lets you toggle the display of seconds in file
time columns on or off.
- Set SORTBY
The Set SORTBY command
can now automatically add the specified columns to the file display if
they're not already turned on (you can only sort by columns that are added to
the file display). To get this behavior, prefix the column name with a
+ sign. For example, Set SORTBY=+datetaken
will turn on the Date Taken column if needed and then sort by
it.
- Set STATUSBARSTYLE
The new Set
STATUSBARSTYLE command lets you control various status bar options,
and also test for them via @ifset. The keywords available for
this command are:
- Single - one single status bar
- Dual - one single status bar, with a separate
definition in dual-display mode
- Independent - separate status bars for left/right file
displays, with separate definitions for left and right
- IndependentSame - separate status bars for left/right
file displays, with the same definition for both
- Bottom - put the status bar(s) at the bottom of the
Lister
- NoBottom - put the status bar(s) at the bottom of the
file display(s)
- Glass - enable glass when the status bar is at the
bottom of the Lister
- NoGlass - disable glass
- Toolbar APPBAR
When opening a floating toolbar,
specify this argument to dock the toolbar with the edge of the
screen.
- Toolbar AUTOCLOSE
The new
AUTOCLOSE argument for the Toolbar command
can be used when opening a floating toolbar to make the toolbar close
automatically after running a command. This lets you have a toolbar that
can pop open (by keypress for example), run a command and close automatically
again, and saves having to add the Toolbar CLOSE=*this
command to all the buttons in the toolbar.
- Toolbar CLOSE=all
This command can be used to
close all toolbars in the current Lister at once.
- Toolbar FLOAT
The new FLOAT
argument lets you open a floating toolbar (equivalent to
STATE=float) with control over its appearance and
behaviour.
- Toolbar LIST
The Toolbar LIST
command can now generate a dynamic list of toolbar
sets.
- Toolbar LOADSET
This new command can be used to
load a toolbar set.
- Toolbar LOCAL
Because toolbars are now local to
the Lister by default, the old LOCAL argument has no
effect (although it will not break compatibility with old commands). You can
now specify LOCAL=no to open or close toolbars in all
open Listers.
- Toolbar POS
The POS argument for
the Toolbar command now works when opening docked toolbars
(appbars), and allows you to control which monitor the toolbar docks to
by specifying coordinates corresponding to that monitor. For example, if your
second monitor's coordinates start at 1920,0, specifying
POS=1920,0 APPBAR=bottom would dock the toolbar to the bottom
of the second monitor.
- Toolbar SAVESET
This command can be used to save
the current toolbars as a set.
- Toolbar STATE
The STATE argument
for the Toolbar command now lets you change which toolbar is
used for the file display border, by specifying STATE=fdb.
For example, Toolbar STATE=fdb TOGGLE "File Display" would
toggle the default file display toolbar on and off.
- Toolbar SETDEFAULT
This command sets the current
toolbars as the Default Toolbar Set.
- Toolbar UPDATE
Use the UPDATE
argument in conjunction with FLOAT and
POS to make changes to already-open floating
toolbars.
- Undo LIST
The Undo LIST command
now accepts the optional arguments nokeys (to disable the
automatic hotkey for each item) and menu (makes the command
behave the same as the old LISTMENU argument).
- @set
The @set directive
lets you set the value of arbitrary variables but until now these were only
valid within the command itself - there was no way for a variable set in one
command to be used in another command. In Opus 11 the @set
directive can now set variables that can be local to the current file
display, the current Lister, or global, and are persistent from one command to
another. They can also optionally be saved to disk so they will survive a
reboot (for example, Lister-local variables are stored in the default Lister
or Lister Layouts). The main use of this functionality is to allow buttons to
set variable values that can then be read by scripts.
To set
global variables prefix the name of the variable with glob:.
Prefix the name with src: and dst: to make
the variable local to the current source or destination tabs, and prefix the
name with lst: to make it local to the Lister. If you want
the variable to be saved (survive a reboot) add an exclamation mark - for
example, glob!:varname.
- @ifset
The @ifset
directive can now test if a variable has previously been set by the
@set directive (although it can't actually test what the
value is - only if it exists or not). For example,
@ifset:$glob:foo would test if a global variable called
foo had been set.
A button on the file display toolbar
can also use @ifset:SIDE=left or
@ifset:SIDE=right to distinguish between the two sides in a
dual-display Lister.
- @ifexists
The @ifexists
directive allows simple branching in a command based on whether
a drive or path exists.
- @functype
The new @functype
directive is used to set the type of an embedded function. Previously
embedded functions were always assumed to be standard functions, but using
@functype you can use scripts or MS-DOS batch commands as
embedded functions as well. For example, the following command would open a
new Lister with an embedded script function that runs in the context of the
new Lister:
Go
NEW
[
@functype:script
@script:vbscript
' script function
here
]
Use @functype:script to specify a
script function and @functype:msdos for an MS-DOS batch
function.
- @icon
The new @icon
directive lets you create buttons that dynamically change their icon based on
the test of a Set-command clause. The default View Mode
Cycle button uses this to change its icon to reflect the current
view mode.
Set
VIEW=Cycle
@icon:largeicons,VIEW=LargeIcons
@icon:smallicons,VIEW=SmallIcons
@icon:listmode,VIEW=List
@icon:powermode,VIEW=Power
@icon:thumbnails,VIEW=Thumbnails
@icon:tile,VIEW=Tiles
@icon:detailsmode,VIEW=Details
Each
@icon directive in the button specifies the icon to use, and
the Set directive to test for. For example, if
VIEW=LargeIcons tests as true, the icon called
largeicons will be displayed on the button. If none of the
@icon tests match then the icon set in the button itself will
be used as the default image.
In the special case of a three-button
button, @iconp: and @icon!: directives can
also be used in any of the child buttons to change the icon of the
parent. @iconp: used in one of the child buttons will
set the icon of the parent (but do nothing to the child
button). icon!: used in one of the child buttons will
set the icon of the parent as well as of that child button.
- @toggle
The @toggle
directive can now control whether a button appears selected (checked)
or deselected (unchecked) based on the test of a Set-command clause. Normally
buttons that run the Set command appear checked or unchecked
based on the state of that Set command itself, but using
@toggle you can run one Set command and test
for another. You can also test for multiple Set clauses at
once. For example:
Set
VIEW=Details
Set
COLUMNSADD=thumbnail(0,96)
@toggle:if&COLUMNSTOGGLE=thumbnail
Normally
this button would appear checked whenever the view mode was set to
Details. However using @toggle we have added an
additional test - the Thumbnail column must also be present for
the button to be checked (the ampersand specifies that the test is in addition
to the one provided by the command - if you leave out the ampersand then only
the clauses in the @toggle directive will be
tested).
You can test for multiple Set clauses by
separating them with semi-colons. For example, you could leave out the
ampersand and still test both the view mode and the column using the following
directive:
@toggle:if
VIEW=Details;COLUMNSTOGGLE=thumbnail
You can also negate the
result of a test with the exclamation mark in front of the Set
clause. For example, to make the button appear checked in any mode
other than Details:
@toggle:if
!VIEW=Details
The
@toggle directive can also test for the existence of a
variable (similar to the @ifset directive). For this to work,
the directive must be the very first line of the button, and the variable you
are testing must have tab, Lister or global scope.