Select by... Color Label

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
woofy31
Posts: 41
Joined: 24 Dec 2020 23:02

Select by... Color Label

Post by woofy31 »

In ACDSee there's a "Select by" menu that allows selecting files by color label, tags, etc. and also allows assigning shortcuts to those menus. However, I'm having a hard time finding a similar thing in XYplorer, and I also looked around the scripting help documentation and couldn't find a "select" command that allows selecting by color labels...

Any idea how that could be accomplished in such a way that one could also assign a hotkey to select files by color labels?

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

Re: Select by... Color Label

Post by highend »

There are "Find by tag / Find by label" buttons and only a ctrl+a would be necessary after using them or e.g. solved via scripting (this one is for labels^^):

Additionally there is e.g. the label column which allows to select via it's context menu...

Code: Select all

    $content = readfile(<xytagdat>);
    $labels  = gettoken(regexmatches($content, "^labels:(\r?\n).+?(?=\r?\n|$)"), 2, <crlf>);
    $labels  = regexreplace(regexmatches($labels, "(^|;).+?\|", <crlf>), "(\||;)");
    $sel     = inputselect("Select label(s)", $labels, <crlf>, 2, , 250, 300);
    if ($sel) {
        $sel    = replace($sel, <crlf>, ";");
        $result = quicksearch("$sel /Ln");
        if ($result) { selectitems $result; }
    }
Any idea how that could be accomplished in such a way that one could also assign a hotkey to select files by color labels?
Load it via a user defined command and assign that one the hotkey...
One of my scripts helped you out? Please donate via Paypal

woofy31
Posts: 41
Joined: 24 Dec 2020 23:02

Re: Select by... Color Label

Post by woofy31 »

AWESOMENESS, thanks so much!

Still, it baffles me that such a simple functionality such as "Select by color label" wasn't implemented... I guess I'll make a feature request.

jupe
Posts: 3320
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Select by... Color Label

Post by jupe »

woofy31 wrote: 13 Apr 2023 21:31 I also looked around the scripting help documentation and couldn't find a "select" command that allows selecting by color labels...
selfilter "Red",, "Label";

woofy31
Posts: 41
Joined: 24 Dec 2020 23:02

Re: Select by... Color Label

Post by woofy31 »

jupe wrote: 14 Apr 2023 00:35
woofy31 wrote: 13 Apr 2023 21:31 I also looked around the scripting help documentation and couldn't find a "select" command that allows selecting by color labels...
selfilter "Red",, "Label";
Well, it's definitely not documented in the Help section for that command, hence why I couldn't figure it out. Awesome, thank you so much!

jupe
Posts: 3320
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Select by... Color Label

Post by jupe »

I must just be able to have the knowledge of how to do it implanted in my head divinely then, or maybe I just read the docs properly, for instance you keep saying there is no GUI command, whereas highend already mentioned that if you have the Label column showing, right click the column content, the select command is there.

woofy31
Posts: 41
Joined: 24 Dec 2020 23:02

Re: Select by... Color Label

Post by woofy31 »

jupe wrote: 14 Apr 2023 01:03 I must just be able to have the knowledge of how to do it implanted in my head divinely then, or maybe I just read the docs properly, for instance you keep saying there is no GUI command, whereas highend already mentioned that if you have the Label column showing, right click the column content, the select command is there.
Definitely wasn't aware of that command in the context menu of that column, BUT does XYplorer allow assigning a hotkey to that context menu command? That was the whole point of my topic, to have a command that I can assign a hotkey to without having to use the mouse in the first place :)

jupe
Posts: 3320
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Select by... Color Label

Post by jupe »

If that was the whole point, you kept it a secret. You can assign a hotkey to the scripting cmd via UDC

woofy31
Posts: 41
Joined: 24 Dec 2020 23:02

Re: Select by... Color Label

Post by woofy31 »

jupe wrote: 14 Apr 2023 01:18 If that was the whole point, you kept it a secret.
It was actually the last sentence of my original topic: "Any idea how that could be accomplished in such a way that one could also assign a hotkey to select files by color labels?"

Anyway, thank you guys for giving me all these options, I really appreciate it!

GreetingsFromPoland
Posts: 283
Joined: 29 Sep 2022 14:20
Location: Win10 @125%

Re: Select by... Color Label

Post by GreetingsFromPoland »

hi all! this is pretty cool. i have Labels setup for each day of the week, e.g. Sunday, Monday, etc. and was filtering like this :

Code: Select all

Label: "Friday";
instead of hard-coding the name of the day, is there a variable that i can replace so it will automatically give me the "pretty print" name of the day ? this way if i filter today it is set to Thursday, tomorrow will be Friday, etc.

i'm looking through the scripting manual now but haven't landed on the day of the week yet. looking into "text datepicker" now to see if i can get that to work.

UPDATE figured it out ! using this as my visual filter works :

Code: Select all

Label:<date dddd>
and this in my hamburger :

Code: Select all

::Filter Today;filter lbl:<date dddd>;

admin
Site Admin
Posts: 65351
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Select by... Color Label

Post by admin »

Label:<date dddd> ... cool idea :cup:

Post Reply