Folders in Favourites?
-
sl23
- Posts: 295
- Joined: 03 Feb 2015 23:34
- Location: XYplorer 64 Latest beta, Win11x64 25H2, 1920x1080 @100%
Folders in Favourites?
When creating many Favourites, I'd like to create a Sub-Folder to keep them in for easier navigation, is that possible?
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Folders in Favourites?
Umm, yes (theoretechnically). You need a parent which is actually a script. But that can't be done using the normal Favorites menu items. you need to use Tools > List Management > Favorite Folders (or Files)
Then add this as a favorite:Favorites > Favorite folders > SubFavs Demo Now hosts a submenu.
This can be mostly automated using a shortcut/button/UDC and a couple little (sub)scripts: one for the addition, and one to actually store and display the favorites.
Then add this as a favorite:
Code: Select all
"SubFavs demo" ::$paths = "C:\<crlf>D:\<crlf><xydata>";load "$paths",,s; //add children to $paths separated by <crlf>This can be mostly automated using a shortcut/button/UDC and a couple little (sub)scripts: one for the addition, and one to actually store and display the favorites.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Stef123
Re: Folders in Favourites?
Very neat trick, Sammay
Could I somehow thweak this into calling my already existing CTB-dropdowns?
For the same reason as sl23 I have set up a few additional CTB dropdowns that hold nothing but GoTo lines. Your trick would not only tidy up my toolbar, it would also give me access to these "custom fav-folder CTBs" from the right-mouse popup.
Could I somehow thweak this into calling my already existing CTB-dropdowns?
For the same reason as sl23 I have set up a few additional CTB dropdowns that hold nothing but GoTo lines. Your trick would not only tidy up my toolbar, it would also give me access to these "custom fav-folder CTBs" from the right-mouse popup.
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Folders in Favourites?
Code: Select all
"SubFavs CTB dock" ::button "ctb11" /*source ctb*/, 1 /*1:left-click, 2:right-click*/;Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Stef123
Re: Folders in Favourites?
Still struggling with this one. Meanwhile I've managed to run it without getting an error message, but it just doesn't do anything, the statusbar says "script terminated by user". I left out what I came to know as /*comments*/, tried it with and without semi-colon at the end
What should it do? Bring up my CTB left and right click menus depending on whether I specify 1 or 2, right?
I also tried renaming my CTB, makes no difference, though.
What should it do? Bring up my CTB left and right click menus depending on whether I specify 1 or 2, right?
I also tried renaming my CTB, makes no difference, though.
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Folders in Favourites?
what
Did you assign the intended ctb to button? The "ctb11" I used is actually the ID of button (the part in [] in Customize Toolbar dlg from a ctb). not it's name (chagning button names won't affect it either)
Exactly.Stef123 wrote:What should it do? Bring up my CTB left and right click menus depending on whether I specify 1 or 2, right? [...]
Did you assign the intended ctb to button? The "ctb11" I used is actually the ID of button (the part in [] in Customize Toolbar dlg from a ctb). not it's name (chagning button names won't affect it either)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
Stef123
Re: Folders in Favourites?
Ha - got it.
Cannot tell you what I did differently this time. Should have kept the first entry instead of overwriting it, to compare. Anyway, it works now.
This will translate into a cleaner toolbar and give me a really super-charged context menu.
One more thing, Sammay - how do get to edit those invisible CTB-buttons? Any chance to pack a kind of self-referencing Edit-call into their subfolders?
Cannot tell you what I did differently this time. Should have kept the first entry instead of overwriting it, to compare. Anyway, it works now.
One more thing, Sammay - how do get to edit those invisible CTB-buttons? Any chance to pack a kind of self-referencing Edit-call into their subfolders?
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Folders in Favourites?
Great!
But if it has (used to have) a RClick script, then what? Hold CTRL and do that again!
Now the sensible thing would be to always hold CTRL and exec that script no matter if the btn has a rclick script or not.
Aside from creating a menu out of those hidden btns, you can also create a menu for editing them, removing any reason to let those buttons play outside (poor buttons!
)

if the button doesn't have (or maybe didn't used to have) a right-click script, ::button "buttonID", 2; will popup the usual Click/Edit/Customize menu.Stef123 wrote:One more thing, Sammay - how do get to edit those invisible CTB-buttons? Any chance to pack a kind of self-referencing Edit-call into their subfolders?
But if it has (used to have) a RClick script, then what? Hold CTRL and do that again!
Now the sensible thing would be to always hold CTRL and exec that script no matter if the btn has a rclick script or not.
Aside from creating a menu out of those hidden btns, you can also create a menu for editing them, removing any reason to let those buttons play outside (poor buttons!
Code: Select all
"Favs of ctb1" button "ctb1", 1;
"Favs of ctb2" button "ctb2", 1;
...
"Favs of ctb42" ::button "ctb42", 1;
"-"
"[hold CTRL]"
"edit ctb1" button "ctb1", 2;
"edit ctb2" button "ctb2", 2;
...
"edit ctb42" ::button "ctb42", 2;Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
-
Stef123
Re: Folders in Favourites?
Went with the second suggestion - very smooth and immediate
Thanks TheQwerty
and Sammay too, for taking the time to explain. Learned some other stuff along the way, by accident 
Code: Select all
userbutton 18, 128;
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: Folders in Favourites?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
XYplorer Beta Club