Hide items in context and drop menus

I made two context menu items for archives, one for 'Extract to [archive name]' and one for 'Extract each archive to separate folder'.
And I used @hidenosel to hide one of the items depending on how many files are selected.

This works for the context menu, but it only works for the drop menu so long as I stay in the same lister the selected archives are in.
When I hold the right mouse button to drag the selected files to another tab and release the mouse button, neither of the menu items are shown.

Is there a way to make this work when the files are dropped in a new tab?
(Or another way to make the menu item name dynamic)

In Settings / File Types, expand File Type Groups, click Archives and then click Edit. In the Edit 'Archives' File Type Group window, switch to the Drop Menu tab (it's in the second row of tabs, where my pointer is pointing the second screenshot). Click the New button and add the commands you tried to add there. Here's a link to the Drop Menu page in the manual:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Drop_Menu.htm

image

Thanks, but that's what I did.
The items are there and work so-long as I stay in the same lister.
I also want them to be visible when I right-click drag my cursor to another tab and release it there.

If I remove the @hidenosel bit they are, but that way both are visible at the same time.
I only want one or the other to be visible (depending on how-many files are selected).

Can you show us the code you're using?

I use this for the 'Extract to [archive name]' item:

@hidenosel:numfiles=1
Copy EXTRACT=sub TO={d|noext}
SELECT NONE 
SELECT DATE=newest SETFOCUS

And the one for 'Extract each archive to separate folder' is almost the same except for the fist line:

@hidenosel:minfiles=2
Copy EXTRACT=sub TO={d|noext}
SELECT NONE 
SELECT DATE=newest SETFOCUS

Umm. I'm confused. Why have two different context menu choices that perform the same actions? Or is this just a test so you can verify things work and then modify one or both commands?

Regardless, I have a feeling this is a bug that @jon or @leo will want to look into.

Yes, that is a bit nit-picky of me.
I wanted the name of the menu item to be different when multiple items are selected.
It could just be one item with the name 'Extract to folder' I suppose... But this seemed nicer (if I can get it to work).

This will be fixed in the next update.

Thanks, worked like a charm!

1 Like