Script/Command to open an collections item location in a new tab

Hi!

I'm searching for a script or some commands that lets me open a collection's item location in a new tab.
Perfect would be, if the process would focus on the file after the new tab has opened.

Thanks,
Michael

You should find it already there on the context menu for collection items:

Oh really? Did not recognize this so far. At least not by its icon. I bet, it isn't there.

In case it's missing, can I restore it somehow, Leo?

Sorry for my ignorance. Just saw the necessary command in the picture above.
Will give it a try or check the context menu again!

I may have added the icon myself at some point, but I'm pretty sure the command should be there by default.

If it isn't there in your config, you can add it via Settings > File Types, in the place shown in my screenshot.

1 Like

Just checked the context menu or the file type setting:

it look slightly different. DO 12.28, btw:


So no open in a new tab, at least not for collection items.

Different story for a collection folder itself: the context menu looks like:
image
Although I did not find so far, where this menu can be configured.
Edit: Found it!

Anyway, primary task is, to open a collection item in a new folder tab. So I've change the appropriate item as you mentioned:
go opencontainer NEWTAB=findexisting

Additional question: is there a modifier that I could add to this command, to toggle between open the new tab in the same lister or in the list on the second listerm e.g. when pressing the ctrl key?

Could solve this myself:

@keydown:ctrl
@ifset:DUAL=on  
   go opencontainer NEWTAB=findexisting OPENINDUAL 
@if:else
   go opencontainer NEWTAB=findexisting  
   
@keydown:none
  go opencontainer NEWTAB=findexisting

I would be thankful for any hint on how to shorten those lines a bit more, e.g. combining two lines into a single one :smiley:

OTH, I wonder, why indenting the @ifset command, for better readability, runs into an error:

@keydown:ctrl
  @ifset:DUAL=on  
    go opencontainer NEWTAB=findexisting OPENINDUAL 
  @if:else
     go opencontainer NEWTAB=findexisting  
   
@keydown:none
  go opencontainer NEWTAB=findexisting

image
The interpreter should be more generous in this case, shouldn't it?

You can’t generally nest those things. Use scripting if you need complicated logic.

1 Like

Thanks Leo!

Leo, it does appear yours is spiffier than the default. This computer never had v11 installed, so this would have been the default for a fresh v12 install. I think changing the default to include the NEWTAB=findexisting argument would make a lot of sense.

image