Hi,
I'd appreciate help.
I would like to set a user button to show folder content in a pop-up menu. Is it possible? How to?
Below there is a snapshot simulating what I'm trying to achieve for the path "Z:/".
For instance, if I add the command [goto "Z:\"] in a user button, XYplorer will navigate to that path.
I don't want to navigate, but expect a pop-up menu with the folders/files under Z:/ being listed.
If I click on one of the folders/files through the user button pop-up menu, just then XYplorer would navigate to a folder or run a file.
Thank you very much!
How to set a user button to show folder content in pop-up menu?
Re: How to set a user button to show folder content in pop-up menu?
Script it?
Get files and folders for the current path (separately)
Bring them in the correct form for popupmenu (caption|data|icon), otherwise you wouldn't see any icons...
Display them and for the selected one decide depdending on if it is a file or a folder if you use a goto or an open command...
Get files and folders for the current path (separately)
Bring them in the correct form for popupmenu (caption|data|icon), otherwise you wouldn't see any icons...
Display them and for the selected one decide depdending on if it is a file or a folder if you use a goto or an open command...
One of my scripts helped you out? Please donate via Paypal
Re: How to set a user button to show folder content in pop-up menu?
Thanks for the reply @highend!
I was trying to make a dynamic menu, sensitive to changes under the folder, without the need to enter line by line each time the folder content changes.
You mean I should enter in the user button each folder content (subfolders/files) line by line, as shown in the snapshot below?Get files and folders for the current path (separately)
By using a script would there be a single command to list everything under Z: in a menu?Script it?
I was trying to make a dynamic menu, sensitive to changes under the folder, without the need to enter line by line each time the folder content changes.
Re: How to set a user button to show folder content in pop-up menu?
Ofc not. There is listfolder() / quicksearch()...You mean I should enter in the user button each folder content (subfolders/files) line by line, as shown in the snapshot below?
No, it requires multiple commands to get files / folders, reformat them...By using a script would there be a single command to list everything under Z: in a menu?
One of my scripts helped you out? Please donate via Paypal
Re: How to set a user button to show folder content in pop-up menu?
Has the OP discovered "Hover Box" yet?
It seems to me this is about replicating the same behavior with a button.
It seems to me this is about replicating the same behavior with a button.
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
Re: How to set a user button to show folder content in pop-up menu?
Thank you all for sharing these functionalities. I was not aware of them. Starting using just now!
Regarding user button usage for access folder content, I have a further question you may help me with:
I added into "left-click script" (user button) a simple list of folders.
As shown in the snapshot below, why folders starting with _ (underline) aren't listed in pop-up user button menu?
Any workaround to force those _ folders to appear in the menu?
Re: How to set a user button to show folder content in pop-up menu?
Since you seem to keep being informed of functionalities you "aren't aware of" perhaps you should read the help file to enlighten yourself, because that is where the answers come from that are supplied to you regularly, for this particular query I suggest this topic:
Scripting > Script Files for the Advanced
but you don't have to stop there.
PS: Quotes can fix a lot of problems.
Scripting > Script Files for the Advanced
but you don't have to stop there.
PS: Quotes can fix a lot of problems.
Re: How to set a user button to show folder content in pop-up menu?
Thanks for the directions!
After exploring the 'Script Files for the Advanced', I could elaborate the following syntax to list in the user menu button the folders having _ (underline) with their respective embedded icons:
Code: Select all
"Media|C:\!APPS\_Media|*" goto "C:\!APPS\_Media";
However, I'm still having problem with _ (underline), now related to the label.
If I prefix underline to _Media, the command doesn't appear in the menu anymore:
Code: Select all
"_Media|C:\!APPS\_Media|*" goto "C:\!APPS\_Media";
HELP b) Is the script above really necessary to show folders having _underline? Would there be a simpler solution?
I mean, if the folder didn't have _ underline character, it would be necessary simply using the raw folder path (e.g. C:\!APPS\Media) to have the folder appearing with icon in the user button menu.
I did try to use quotes direct "C:\!APPS\_Media", but it didn't work.
I also recorded my screen showing the issues I'm facing in details: http://bit.ly/2KSVz9g
Thank you!
Re: How to set a user button to show folder content in pop-up menu?
"&_Media|C:\!APPS\_Media" goto "C:\!APPS\_Media";
- There are different solutions, one of which is using a popupmenu instead (which was already suggested to you in the first reply you received to this same topic also how to use popupmenus has previously been explained to you here: viewtopic.php?t=16936#p145462 and other topics, as well as in the help file) but easier is debatable, anyway you are planning to create this menu dynamically via script, so it shouldn't really matter.
Re: How to set a user button to show folder content in pop-up menu?
Many thanks for your reply!
Regarding popup menus (from user button), I'm facing an issue I'd appreciate further help
When I insert in the user button a single line script to copy an item and paste in the current path, it works:
However, when I insert that script into a popup menu, it isn't working anymore:
What could be going wrong with the script running through a popup menu?
Regarding popup menus (from user button), I'm facing an issue I'd appreciate further help
When I insert in the user button a single line script to copy an item and paste in the current path, it works:
Code: Select all
copyitem "Z:\Templates\File.pdf", "*.?";
Code: Select all
$menus = <<<>>>
copyitem "Z:\Templates\File1.pdf", "*.?";
copyitem "Z:\Templates\File2.pdf", "*.?";
>>>;
popupmenu($menus, , , , , , <crlf>);
Re: How to set a user button to show folder content in pop-up menu?
That command returns a selection (a string!) from what the menu displayed...
One of my scripts helped you out? Please donate via Paypal