Favorite folder on Toolbar?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Favorite folder on Toolbar?

Post 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?
ste(phen|ve) kunkel

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

Re: Favorite folder on Toolbar?

Post by highend »

The UDC has a command ID in the lower right corner... Put that in the "On left click" of the tb button...
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Favorite folder on Toolbar?

Post 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?
ste(phen|ve) kunkel

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

Re: Favorite folder on Toolbar?

Post 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;
    }
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Favorite folder on Toolbar?

Post by kunkel321 »

My bad... If I had searched the help file for "droppable," I would have found it.

Thanks Highend.
ste(phen|ve) kunkel

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Favorite folder on Toolbar?

Post 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.
ste(phen|ve) kunkel

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

Re: Favorite folder on Toolbar?

Post 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...
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Favorite folder on Toolbar?

Post 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.
ste(phen|ve) kunkel

Post Reply