Command: ListerDoubleClick (adds qualifier evaluation)

ListerDoubleClick - Script command which dispatches doubleclicks onto the listers background based on the qualifiers pressed.

Description:
You probably already doubleclick the listers background to go back one folder. I use it all the time. Now with this tiny command, you can have different actions performed, based on what key you press while doubleclicking. The provided script adds SHIFT+DClick to copy the lister path to clipboard and CTRL+DClick to go to the path in the clipboard. Multiple qualifiers are supported for new ideas, a regular doubleclick works as before.

This script is a bit different from the usual stuff, as it looks for event functions itself, just like DO does.
So if you like to have SHIFT+CTRL to switch to thumbnails mode, you simply create a function like this:

Using this technique saves you from creating unthinkable constructs, to cover every combination of qualifiers there is, by merely using 15 lines. The parameters "data" and "cmd" translate to scriptCommandData and scriptCommandData.func.command (for conveniance).

Download:

Installation - Opus 12 (and above):

  • Download the lastest *.js.txt file above and drag it to the list under Preferences / Toolbars / Scripts.

  • Edit the script to add/remove

  • Go to Preferences / File Displays / Mouse and set Double-click on file display background to run the command ListerDoubleClick:

  • Now it's ready to use, edit the script to set your functions as desired. You can also enable debug output in the script's config section.

Installation - Opus 11:

  • Download the latest *.js.txt file above and drag it to the list under Preferences / Toolbars / Scripts.

  • Create a new user command called "ListerDoubleClick_UC" and insert the new script command "ListerDoubleClick" (names need to be different).

    Opus11_1

  • Then enter the prefs dialog and choose the user command to execute when doubleclicking the folder background.

  • Now it's ready to use, edit the script to set your functions as desired. You can also enable debug output in the script's config section.

2 Likes

@tbone, I love this script. I am using it on alt, shift and ctrl qualifiers.

Would it be possible to extend it to use a right-double-click event?

Thanks, I'm glad to hear. o)
Fetching a right double click is not possible currently, because DO does not trigger any event or user-command if you dclick-right.

Found that today, nice!

Hi tbone,

I run a user command for similar functionality. Does your script offer anything different to this?

@keydown:none
Go BACK UP
@keydown:ctrl
Go ROOT
@keydown:alt
Go BACK UP
Set QUICKFILTER=!prev
@keydown:ctrlshift
Go /mycomputer NEWTAB=findexisting 

@blueroly: No difference, using yours now because UC is more "compact" than running via script. Thanks!

Precisely what I thought, thanks for confirming Sasa.

The event-based script enriches the current event-system of DO, as there was no OnDoubleClickListerBG() event yet. Its major benefit is to raise consistency on how things work in DO v11. The usercommand-way of handling the doubleclick onto a listers background is a left-over to my eye, and does not fit to how the other events are implemented. This is especially true for OnClick() and OnDoubleClick(), which are available by scripting only, not by creating and placing usercommands somewhere deep into the prefs.

Those, who don't like consistency raise their hands now! o)

An external resource is also much easier to edit and testdrive than using the usercommand-editor with its drawbacks (a lot of clicks necessary, cannot run code directly etc.).