|See Raw Commands in the manual|
for descriptions of the internal
commands and their arguments.
Pre-made buttons are provided for doing all the things you'd expect like switching to a thumbnails view or jumping to My Computer. You'll find buttons for doing basic file copying and renaming on the default toolbar and there are more in the customize dialog, ready to be dragged to your toolbar, as we saw already. But what happens when those 180 pre-made buttons aren't enough and you want to do something slightly different? You roll your own!
|See External Command Control Codes,|
and John Zeman's tutorial document,
to learn about the codes used to pass
arguments to other programs.
The drop-down menus in the Advanced Button Editor help you by providing context-sensitive lists that show the available commands and currently applicable arguments. You never have to go to the manual just because you've forgotten an argument's name.
This section should give you a taste for what can be done using custom buttons. These are all based on real-world examples, taken from my own configuration.
|Drop-down menus help when making custom buttons.|
|Create folder from clipboard|
Let's start with something simple. By default, the CreateFolder command pops open a dialog where you give the name of the folder you want to create. (It can also create multiple folders at once, including hierarchies.) If you add the FromClipboard argument to the command then it won't open a dialog anymore; instead it will create a folder automatically using whatever is in the clipboard for its name.
The Opus "three-button" is ideal for putting several versions of a given command on the toolbar without using any extra space. Left-click the button for one function, middle-click for another and right-click for a third variant. You can also create pop-up menus and hybrid button-menus which consist of both a button and, next to it, a small arrow which opens a pop-up menu.
You could assign the Create Folder From Clipboard function to the right-click action of the Create Folder button on the default toolbar, enabling you to have both the normal and your customized functionality available at the same time on the same button.
|Rename in one click|
If you find yourself frequently doing the same rename operation then you can make a button which does it in a single click. Find and replace, wildcards and regular expressions are all supported for renaming, both in the Rename dialog and in one-click button commands.
Convert underscores to spaces:
Capitalise the first letter of every word:
The @NODESELECT line tells Opus to leave the files selected after the command has run. This is useful when you know you'll often want to run another function on the same files.
I've got these commands on the right-click and middle-click actions of my Rename button for quick access to either or both of them.
|Rename with the date and time|
You can insert the current date and time into the names used when creating and renaming files and folders. This is great for quickly timestamping a backup or making a temporary folder with a unique name via a single click.
Create Dated Folder:
Time-Prefix Selected Names:
I use this button on directories where files are created by other programs and the same filenames are used for each run (e.g. Frame01.jpg). I can quickly do a select all and then click this button without further thought. The first line ensures that files whose names already start with "sorted_" are not renamed a second time.
Date-Suffix Selected Names:
The first rename only acts on directories while the second only acts on files. While the first uses a simple wildcard, the second uses a more complex regular expression in order to insert the date and time before the file extension.
In Opus 8.1 you can use the * wildcard more than once which means the second line doesn't need to use a regular expression anymore and can be simplified to this:
|The Go command|
The Go command is very powerful and has more options than most.
If you want a button which simply takes you to a particular folder, that's easy:
You can also move relative to the current directory. Say you want a button which opens the parent directory in a new window:
Or in a new tab:
One of my three-buttons is used for opening new tabs. Left-clicking it opens a new tab in the current window, showing a second copy of the current folder.
Right-clicking the same button will open all the selected folders in new tabs. The nofocus part means the tabs open in the background without switching away from the original tab.
Middle-clicking the three-button opens the container of all selected folders and shortcuts. This is especially useful when you've done a search and want to go to the directories containing all the matching files:
|Create or extract multiple Zips at once|
This command will create a zip of each selected directory, naming the zips automatically after their respective directories which are created in the current directory. (Opus has a Source and Destination concept and, without the HERE argument, the results would end up in whichever Opus window was designated the Destination.)
The next command does the opposite, extracting all selected zip files, creating an appropriately named directory from each zip. It leaves the zips selected so that it's easy to then click the delete button to get rid of them.
Continue to the next page to see more Custom Button Examples, starting with automated image conversion.