Open menus at mouse location (favorites, recent folders, etc.)

Features wanted...
Luigi
Posts: 57
Joined: 01 Sep 2011 00:41

Open menus at mouse location (favorites, recent folders, etc.)

Post by Luigi »

fav folders.png
fav folders.png (7.45 KiB) Viewed 3399 times
I set keyboard shortcut for "Favorite Folders" menu

When I press the shortcut, the favorites menu always spawns at top-left of the application, not at mouse location.
top left.png
top left.png (27.07 KiB) Viewed 3399 times
I think this can be improved with few options:

1. Spawn near mouse location
2. Spawn near active panel (left / right panel)

highend
Posts: 14566
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by highend »

How to tweak: https://www.xyplorer.com/faq-topic.php?id=tweak

; Tweak: popup menus at selected control or item
PopupMenusAtSelection=0
One of my scripts helped you out? Please donate via Paypal

Luigi
Posts: 57
Joined: 01 Sep 2011 00:41

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by Luigi »

Thanks that worked

lenraphael
Posts: 18
Joined: 19 Aug 2016 23:52

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by lenraphael »

I understand basics of setting up favorite folders, but how would I add the location of the hidden "recent folders." In MS file explorer, it was shell:::{22877a6d-37a1-461a-91b0-dbda5aaebc99}

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by admin »

This works here:

Code: Select all

%user%\AppData\Roaming\Microsoft\Windows\Recent
PS: Or simpler:

Code: Select all

%user%\Recent

klownboy
Posts: 4397
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by klownboy »

Hi Don, since it was brought up here (i.e., using shell), I'm not sure why something like this...

Code: Select all

"Control Panel All Tasks|:cks" run "%windir%\explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"
works fine in a menu or nested menu, but fails in the address bar or as a Favorite Folder with an error message: Not found: Location or item.
Could not find...
Not a big deal obviously, but I'm not sure if it may be a bug since the syntax works fine in a menu. Thanks.

lenraphael
Posts: 18
Joined: 19 Aug 2016 23:52

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by lenraphael »

Screenshot for dummy's please.

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by admin »

lenraphael wrote:Screenshot for dummy's please.
Just saw that my last reply was wrong. That was not the folder you wanted.

Do this instead: To open the "Recent Folders" location in Explorer you can use this line as favorite:

Code: Select all

"Recent Folders" run "%windir%\explorer.exe shell:::{22877a6d-37a1-461a-91b0-dbda5aaebc99}";
Add it via menu Tools | List Management | Favorite Folders...
Attachments
2017-09-04_083835.png
2017-09-04_083835.png (9.89 KiB) Viewed 3189 times

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by admin »

klownboy wrote:Hi Don, since it was brought up here (i.e., using shell), I'm not sure why something like this...

Code: Select all

"Control Panel All Tasks|:cks" run "%windir%\explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"
works fine in a menu or nested menu, but fails in the address bar or as a Favorite Folder with an error message: Not found: Location or item.
Could not find...
Not a big deal obviously, but I'm not sure if it may be a bug since the syntax works fine in a menu. Thanks.
Works here. But you have to add the trailing ; (semicolon)... :)

klownboy
Posts: 4397
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by klownboy »

Dam, I can't believe I missed that. For years it's been missing from a scripted menu yet it still worked. So when I cut and pasted the line to Favorite Folders and the Address bar it was without the semicolon. Thanks Don.

lenraphael
Posts: 18
Joined: 19 Aug 2016 23:52

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by lenraphael »

Thanks. The screen shot made all the difference.

xyplorerköln
Posts: 177
Joined: 01 Jan 2016 18:59

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by xyplorerköln »

admin wrote:
lenraphael wrote:Screenshot for dummy's please.
Just saw that my last reply was wrong. That was not the folder you wanted.

Do this instead: To open the "Recent Folders" location in Explorer you can use this line as favorite:

Code: Select all

"Recent Folders" run "%windir%\explorer.exe shell:::{22877a6d-37a1-461a-91b0-dbda5aaebc99}";
Add it via menu Tools | List Management | Favorite Folders...
Hi! Thanks for posting this solution.

This works - as does just putting "shell:::{22877a6d-37a1-461a-91b0-dbda5aaebc99}" as an item in a catalog. However, it (of course, because of using shell or explicitly naming explorer.exe) opens the Recent Folders in a Windows File Explorer window.

I need to be able to see recent folders used both inside and outside XYplorer (for example, folders operated on by other applications). So the native Windows Recent Folders functionality works well, and obviously XYplorer's own Recent Locations list doesn't include any locations used outside XYplorer. But I'd like to be able to use Windows' Recent Folders in XYplorer - navigating to that virtual location within the XYplorer interface - without using Windows File Explorer.

Possible?

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by admin »

This is the real path containing all those LNK files:
C:\Users\[username]\Recent

The Windows Recent Folders (German: "Zuletzt besucht") virtual folder seems to grab only the folder links from that list. XYplorer cannot do that ATM.

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by jupe »

As a bit of a hack workaround if you are interested you could use something like this:

Code: Select all

	$files = quicksearch("*.lnk", "%APPDATA%\Microsoft\Windows\Recent");
	$list = "";
	foreach($file, $files, <crlf>) {
		$prop = property("#LinkTarget", $file);
		if (exists($prop) == 2) {
			$list .= $file . ";";
		}
	}
	goto trim(formatlist($list, "d", ";"), ";") . "?";
or if you preferred a paper folder like display:

Code: Select all

	$files = quicksearch("*.lnk", "%APPDATA%\Microsoft\Windows\Recent");
	$list = "";
	foreach($file, $files, <crlf>) {
		$prop = property("#LinkTarget", $file);
		if (exists($prop) == 2 && strlen($prop) > 4) {
			$list .= $prop . <crlf>;
		}
	}
	paperfolder("Recent Folders", formatlist($list, "de", <crlf>));
or this also is another option, it works on Win10, can't confirm if the property number is the same on other OS version

Code: Select all

	$files = quicksearch("*.lnk", "%APPDATA%\Microsoft\Windows\Recent");
	$list = "";
	foreach($file, $files, <crlf>) {
		$prop = property("#11", $file);
		if ($prop == "Link; Folder") {
			$list .= $file . ";";
		}
	}
	goto trim(formatlist($list, "d", ";"), ";") . "?";

it would take a few seconds to check every file though. If you use the Paper Folder option though you would only need to run it when you need to see the most recent entries.

xyplorerköln
Posts: 177
Joined: 01 Jan 2016 18:59

Re: Open menus at mouse location (favorites, recent folders, etc.)

Post by xyplorerköln »

Don, thank you.

And jupe, I just got around to taking a look at the workarounds you provided. Excellent!! I am really thankful that you take the time to read requests and provide such thorough, detailed solutions. Thank you.

Post Reply