OpusLauncher is a FAYT and standalone command script add-in for Directory Opus that lets you run any application with custom arguments, using selected files as parameters—all powered by Opus and Everything.
Its main features include:
- Can be used in FAYT mode or as a command through its own dialog.
- Highly customizable when creating the database.
- Can read extended metadata from executables and follow links, similar to third-party launcher programs—all running in the background!
- Allows exclusion of files by path, keywords, etc.
- By leveraging Everything, results are delivered in seconds!
- Supports parameters like selected files and other Opus-specific arguments.
- Can update the run counter in Everything, prioritizing frequently used programs in the list.
Although Opus offers unmatched customization in the world of file managers, and you can create buttons to run your most-used programs, there have been times when I wanted to open something with a specific program, sometimes even using certain custom arguments. Instead of navigating through the "Open with" menu (which might not even list the program you're looking for) or performing many extra steps, you can select the files to use, search for the program you want, and open it with the pre-configured syntax. This is the main motivation behind creating this command some time ago.
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.
Before You Begin
- Note that this script was developed with EV 1.5 or higher in mind, so this version is recommended/required.
- In EV's settings, it is highly recommended to enable
Index date modified
(Options > Indexes) for better performance when tracking changes.
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.
v1.0.1 : OpusLauncher.opusscriptinstall
Options
In the Script Management window, select OpusLauncher
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.
- included paths: Paths that will be included in Everything's search to build the database.
- excluded paths: Paths to be excluded from the database.
- excluded words: Words in the full path that will be excluded from the database. Supports Everything wildcards.
- included exts: Extensions to be included in the database. Only use those that are expected to accept files as arguments.
- max timeout: Maximum time in milliseconds to wait for Everything results.
- database path: The path where the database will be saved.
- use targets for links: Follow targets for links when building the database.
- ignore folders: Set to False to include selected folders as arguments.
- max results listed: Define a maximum number of results to improve load speed. Use 0 to list all results. (Dialog Mode)
- load icons: Choose whether icons should be displayed when listing results. (Dialog Mode)
- exit on run: Set to True to close the dialog after a successful run. (Dialog Mode)
Usage
You can use OpusLauncher
from the FAYT bar, and as a command with its own dialog.
FAYT Mode
Start by selecting the files you want to use as arguments.
Then press the control key (by default it’s $) and start typing in the FAYT field. To access the results and navigate between them, press Up or Down arrow keys.
The matches are always partial!
To finalize, press Enter to run the selected program.
By default, the command will run using "<fullpath_to_app>" {allfilepath}
. Or, if the database has been extended and the entry is a link, it will use its own arguments.
This can be changed by customizing the arguments for each entry (described in Notes below).
If you don't want to use the selected items as arguments, append a $ at the end in the FAYT field.
You can also open the location path for the selected entry, by pressing Ctrl + Enter.
Command Mode
In this mode, a custom dialog is used, so there is more control and customization compared to the FAYT mode.
Command Arguments
ARGUMENT | TYPE | DESCRIPTION |
---|---|---|
NOSELFILES | /S | Start the dialog with 'Use selected files' unchecked. |
BUILD | /O/K | Build the extended database on demand in the background. Use `noload` to start a fresh database, otherwise the database will just be updated. Note that this argument is used internally on different occasions, so it is not usually necessary to call it manually. |
EDITARGS | /S | Open the dialog for manage custom saved args. |
DROPONLY | /S | By default, the command "follows" the active tab to use the selected items, source, destination, etc. If this argument is used, only the files that are "dropped" into the dialog are considered. |
Hotkeys
The followed hoykeys are supported (dialog mode) :
- F4 : Set focus to the filter control.
- Enter : Run selected item from the list.
- Ctrl + Enter: Open the location path for selected item.
- Up/Down : Navigate through the list.
Notes / Technical Stuff
- Extended Database: The command aims to use the extended metadata of executables for searches, which is a personal decision, as it is more common to know the canonical name of a program rather than the filename itself. This is why generating a custom database is necessary to improve load times later.
- The command behaves differently depending on the mode and whether EV is running or not.
- If EV is running, it always performs a quick data update in all modes.
- If EV is not running, in FAYT mode it will use the extended database, if it exists (FAYT mode doesn't generate this kind of database). In dialog mode, if
everything_autolaunch
is configured, the command will auto-launch EV and close it once it's done.
- If EV is running when executing something using the command in any mode, the value of
runcount
in EV will be incremented. This is useful as it helps to get the most frequently used entries first. - To customize a new argument, it needs to be done from
dialog mode
, selecting the entry in question and using theEdit Args
button. In theory, the same variables that can be used, e.g., when creating a button in Opus ({allfilepath}, {sourcepath}, etc.), are compatible. Though I imagine some things might not be possible at the moment- One idea I've been considering is the possibility of setting up true 'script' commands, with multiple lines, just as you would in an Opus button, where you could reference the selected entry with something like
{entry}
. Although I'm not sure how useful that would be, assuming you can create a button for similar tasks (the difference being this wouldn't behave as dynamically).
- One idea I've been considering is the possibility of setting up true 'script' commands, with multiple lines, just as you would in an Opus button, where you could reference the selected entry with something like
- Saved arguments can be edited using
OpusLauncher EDITARGS
. - You "can" index other file types rather than .exe or .lnk, but that doesn't mean you should.
excluded words
supports Everything wildcards and matches against full path values.
Changelog
v1.0.1 (Dec 22, 2024) : OpusLauncher.opusscriptinstall (10.4 KB)
- Added support for excluding selected items in FAYT mode by appending $ at the end.
- Removed confirmation dialog when dropping items.
v1.0.0 (Dec 22, 2024) : Initial release
OpusLauncher.opusscriptinstall (10.4 KB)