Page 1 of 1

Favorite folder on Toolbar?

Posted: 22 May 2018 23:14
by kunkel321
I know there must be multiple ways to do this... I see that I can assign a favorite folder to a User-Defined Command, but I don't see how to put the UDC onto the Toolbar(?) Do I just need to make a script pointing to the folder, then put the script on the toolbar?

Re: Favorite folder on Toolbar?

Posted: 22 May 2018 23:28
by highend
The UDC has a command ID in the lower right corner... Put that in the "On left click" of the tb button...

Re: Favorite folder on Toolbar?

Posted: 23 May 2018 00:42
by kunkel321
Ah yes, very good. Thank you Highend!

EDIT: Follow up question...
Is it possible to make the button "drop-able" in the sense that I can be in a different folder, then drag-n-drop a file onto the icon, and the file gets sent to the folder?

Re: Favorite folder on Toolbar?

Posted: 23 May 2018 05:40
by highend
Enter a Location into the "Name" field and leave the "On Click" field empty -> Droppable user button
Ofc it only works with a single folder (you just have to name it)

Or script that thing normally:

Code: Select all

    $favs = regexreplace(favs("d"), "^(.*?)(?:\r?\n|$)", "$1||$1<crlf>");
    $dst = popupmenu("$favs", 6:=<crlf>, 7:="|");
    if ($dst) {
        copyto $dst, "<selitems <crlf>>", , , 2;
    }

Re: Favorite folder on Toolbar?

Posted: 23 May 2018 21:49
by kunkel321
My bad... If I had searched the help file for "droppable," I would have found it.

Thanks Highend.

Re: Favorite folder on Toolbar?

Posted: 24 May 2018 15:57
by kunkel321
Also, Thanks for the cool code, Highend. I probably will stick to the 'vanilla' droppable buttons for now. The code does work though. There's a bit of a delay when it pops up my list of favorites, but that might be because there are so many, and probably several that are invalid and/or pointing to network locations.

Re: Favorite folder on Toolbar?

Posted: 24 May 2018 16:07
by highend
If you like to try it, you could use:

Configuration | General | Refresh, Icons, History | Icons | [x] Use generic icons for super-fast browsing
Configuration | General | Refresh, Icons, History | Icons | [x] But only in network locations

The invalid ones shouldn't be the problem. But I don't know if this works as expected in scripts...

Re: Favorite folder on Toolbar?

Posted: 25 May 2018 00:30
by kunkel321
highend wrote:Configuration | General | Refresh, Icons, History | Icons | [x] Use generic icons for super-fast browsing
Configuration | General | Refresh, Icons, History | Icons | [x] But only in network locations
You were correct! This completely took away the delay :biggrin:

FYI if anyone else wants to use the script, here's a nice "send to folder" "send to favorite" image.
Image

Also, I changed it to do moveto $dst, and it seems to work fine that way. It's kinda' a "dangerous" script, because I can easily send it somewhere and not know where the heck I sent it. Luckily xyplorer has its 'undo' feature, so Ctrl+Z undoes any accidental moves. :wink:

EDIT:
Image Here, I replicated Don's chunky orange star a bit better.