ToolbarPalette is a script add-in command for Directory Opus, allowing users to execute their commands, scripts, and other toolbar content quickly and efficiently through an intuitive search interface. Inspired by command palettes from other applications, this tool integrates seamlessly into your workflow, giving you the ability to search 'n run across all your toolbars.
Motivated by @grosner's request, a standout feature is the ability to easily locate and use buttons from any toolbar—even those not currently visible—making it especially useful for users managing multiple toolbars.
Key Features:
- Provides a search interface to execute any button from any toolbar, as if launched directly from it.
- Allows searching by label, description, instructions, hotkey or toolbar names.
- Prioritizes speed when handling results.
- Advanced search options for greater control over results.
- Supports Opus wildcard syntax, regex, case matching, diacritics, and whole-word searches.
- Extensive customization for indexing toolbars, including those not in active use.
- Indexation capability for improve performance.
- Support parameters such as selected files and other Opus-specific arguments, just like a button!
- Real-time detection of toolbar changes!
- Fully customizable right click menu, with support for variables included.
IMPORTANT: READ BEFORE PROCEED
This script is provided "as is" and without warranty of any kind or whatsoever.
It has been made during my spare time and has not been extensively tested, so it is presented as a testing version.
The user assumes full responsibility for its use and understands that the author is not responsible for possible failures or loss of data.
Kind remind that this is a work in progress, so expect bugs.
Any feedback on possible improvements or bugs is welcome.
How to Install
IMPORTANT: Needs at least DOpus v13.12
Download the file below. Then go to Settings / Scripts (or run Prefs SCRIPTINSTALL
) and select the downloaded file.
v2.0.0 : ToolbarPalette.opusscriptinstall
Options
In the Script Management window, select ToolbarPalette
and click in the Edit button.
- log level : Logging level to be displayed.
- OFF to show only errors.
- DEBUG to show all messages.
- STANDARD to show only the most relevant information.
- WARNING to show messages that needs your attention.
- nested separator : Separator to use in anidated menus.
- excluded words : If a command has one of this words, it will be excluded from list.
- include lister hotkeys : Set to True to include entries from lister hotkeys.
- include system hotkeys : Set to True to include entries from system hotkeys.
- include floating toolbars : Set to True to include buttons from floating toolbars.
- include all toolbars : Set to True to include all the toolbars, even the unloaded ones.
- excluded toolbars : List of toolbar names that will be ignored by the command.
- no exit after run : Set to True to keep the command open after running the selected button.
- load/save UI position : Set to True to save and load the dialog's last used position.
- allow multiple instances per lister : Set to True to allow multiple commands running
simultaneously per Lister. - Label column max width : Max width for Label column. Set to 0 to always autosize to content.
- FunctionType column max width : Max width for Function Type column. Set to 0 to always autosize to content.
- Hotkey column max width : Max width for Hotkey column. Set to 0 to always autosize to content.
- Description column max width : Max width for Descrption column. Set to 0 to always autosize to content.
- Instructions column max width : Max width for Instructions column. Set to 0 to always autosize to content.
- Esc key close dialog : Set to True to use Escape key to close the dialog.
Usage
ToolbarPalette
supports the following arguments:
Command Arguments
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
FORCERELOAD | /S | Force database index creation. |
REGEX | /S | Open the dialog with 'Regular Expressions' checked |
CASE | /S | Open the dialog with 'Match case' checked |
WHOLEWORDS | /S | Open the dialog with 'Whole words' checked |
WILDCARDS | /S | Open the dialog with 'Opus Wildcards' checked |
DIACRITICS | /S | Open the dialog with 'Allow diacritics' checked. |
FORCEEXEC | /S | By default, when executing certain buttons (e.g. those with instructions that take the selection into account), a confirmation is displayed. Using this argument suppresses that confirmation. |
ADVSEARCH | /S | Enables Advanced Search (see below in Notes > Advanced Search). |
SEARCHFILTER | /R | Starts the dialog with the filter set by this argument. |
EDITMENU | /S | Open the Edit Menu dialog to customize the right click menu. |
NOFILTER | /S | Force inclusion of detected dynamic buttons in the list. |
EditMenu
Version 2.0.0 introduces a right-click menu for each item that can be customized. To do this, you can use ToolbarPalette EDITMENU
or the pencil icon from the ToolbarPalette window. These entries are designed to execute/automate tasks related to toolbars and their associated entries. For example, copying a toolbar, displaying a non-visible toolbar in the List, etc.
The supported commands are the same as those used within Directory Opus (e.g., when creating a button), with the feature that the following variables are predefined:
$label$
: Label of the button/menu shown in the list.$desc$
: Description of the button/menu shown in the list.$hotkey$
: Hotkey of the button/menu shown in the list.$toolbar$
: Name of the toolbar of the button/menu shown in the list.$instr$
: Instructions of the button/menu shown in the list.$toolbar_file$
: Full path of the toolbar on disk where this button/menu is located.$toolbar_group$
: Indicates the position of the toolbar in the List where this button/menu is located. It can betop
,bottom
,left
,right
,center
,fdright
,fdbottom
,tree
,none
,hotkeys
, ormenu
.$toolbar_pos$
: Line number within the toolbar's group that it resides on in the List where this button/menu is located.-1
if not part of a toolbar.$toolbar_line$
: Pixel position from the left/top of the toolbar's line in the List where this button/menu is located.-1
if not part of a toolbar.
Hotkeys
Available hotkeys are :
F5 : Refresh the list
F3 : Focus on the filter control
Alt+W : Toggle 'Use Wildcards' button
Alt+G : Toggle 'Use Regex' button
Alt+C : Toggle 'Match case' button
Alt+D : Toggle 'Allow diacritics' button
Alt+H : Toggle 'Use whole words' button
Up/Down : Navigation buttons
If the list has focus:
Enter : Run the selected item
Ctrl/C : Copy instructions from the selected item to the clipboard
Also Enter will apply the filter when Advanced Search
is enabled.
Notes / Technical Stuff
-
General
- Certain buttons may have "usage requirements" based on the selection type or other scenarios.** By default, the command detects these instructions and asks for confirmation to continue executing them (since their usage requirements may not be met). So, special attention should be given to these warnings!
- Some buttons with instructions that generate dynamic content (e.g.
GO FOLDERCONTENT
,Go DRIVEBUTTONS
,FILETYPE***
, etc) are automatically ignored. - You can use
excluded words
if you detect any others that may cause issues when used out of context. - If you are using this command for something other than executing other commands, you may want to include the
NOFILTER
argument, which forces the listing of this type of command.
-
Context Menus
- The only context menu currently supported is
All Files and Folders
. In the future, it may expand to include all context menus, which would be added or removed from the list depending on changes in the item selection within the Lister. - Entries in context menus that use
FILETYPE CONTEXTMENU
or similar are ignored because, unfortunately, they cannot be executed outside the menu's context, and no known workaround exists.
- The only context menu currently supported is
-
Hotkeys
- Certain keys may depend on the language and keyboard layout. Since there doesn't seem to be a way to obtain that data via scripting, the command "assumes" that the language matches the one in which DOpus is running. As a result, errors may occur, or the key may appear as
???
in some cases.
- Certain keys may depend on the language and keyboard layout. Since there doesn't seem to be a way to obtain that data via scripting, the command "assumes" that the language matches the one in which DOpus is running. As a result, errors may occur, or the key may appear as
-
Advanced Search
- Allows performing searches based on more advanced criteria, combining search fields using basic logic.
- Its syntax is in the form:
$l|d|v|t|h(==|!=)"value"
, where:
$l: Label
$d: Description
$v: Instructions
$t: Toolbar
$h: Hotkey && or AND
and|| or OR
are supported- e.g.
$l=="fav" && $d!="edit"
It will list all the entries with "fav" in their labels and whose description does not contain "edit".
-
UI
- There is a small "button" that acts as a pseudo-tooltip to help identify the search flags, located right below them.
- You can choose which fields to use in the search by clicking the filter icon and selecting them. By default, it fallsback to "label".
Greetings
To @grosner for the idea.
Anyone who participate in the betas.
@abr for the German translation.
Changelog
v2.0.0 (Jan 13, 2025) : ToolbarPalette.opusscriptinstall (22.7 KB)
- Added support for listing hotkeys.
- Added support for listing entries in context menus (limited to "All Files and Folders").
- Added support for a fully customizable right-click menu with predefined variables:
- Current variables include:
$label$
,$desc$
,$hotkey$
,$instr$
,$toolbar$
,$toolbar_file$
,$toolbar_line$
,$toolbar_pos$
, and$toolbar_group$
. - The menu comes with two predefined entries to help you understand how to use it.
- Current variables include:
- New arguments:
EDITMENU
,NOFILTER
. - Added options to define maximum width for columns in the list.
- Other minor fixes.
Full changelog
v1.0.2 (Jan 04, 2025) :
- Added
allow comments in commands
in the Script Config, enabling users to choose whether commented lines in instructions are displayed or ignored.
v1.0.1 (Jan 01, 2025) :
- Added exclusion for additional
Go
commands in instructions. - Added exclusion for commented instructions.
v1.0.0 (Dec 22, 2024) : Initial release