Page 1 of 1
Folders in Favourites?
Posted: 15 Mar 2015 14:53
by sl23
When creating many Favourites, I'd like to create a Sub-Folder to keep them in for easier navigation, is that possible?
Re: Folders in Favourites?
Posted: 15 Mar 2015 15:42
by bdeshi
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:
Code: Select all
"SubFavs demo" ::$paths = "C:\<crlf>D:\<crlf><xydata>";load "$paths",,s; //add children to $paths separated by <crlf>
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.
Re: Folders in Favourites?
Posted: 16 Mar 2015 08:26
by Stef123
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.
Re: Folders in Favourites?
Posted: 16 Mar 2015 15:12
by bdeshi
Code: Select all
"SubFavs CTB dock" ::button "ctb11" /*source ctb*/, 1 /*1:left-click, 2:right-click*/;
"
your trick would not only tidy up my toolbar" - when using the SC button, you can actually remove the source (ctb11, or whatever) from your toolbar altogether (without clearing the button-scripts ofcourse).

Re: Folders in Favourites?
Posted: 17 Mar 2015 09:50
by Stef123
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.

Re: Folders in Favourites?
Posted: 17 Mar 2015 11:56
by bdeshi
what
Stef123 wrote:What should it do? Bring up my CTB left and right click menus depending on whether I specify 1 or 2, right? [...]

Exactly.
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)
Re: Folders in Favourites?
Posted: 17 Mar 2015 13:31
by Stef123
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?
Re: Folders in Favourites?
Posted: 17 Mar 2015 14:04
by bdeshi
Great!
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?
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.
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;

Re: Folders in Favourites?
Posted: 17 Mar 2015 14:26
by TheQwerty
Re: Folders in Favourites?
Posted: 17 Mar 2015 14:50
by Stef123
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

Re: Folders in Favourites?
Posted: 17 Mar 2015 15:09
by bdeshi