Page 1 of 1

Select by... Color Label

Posted: 13 Apr 2023 21:31
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?

Re: Select by... Color Label

Posted: 13 Apr 2023 22:07
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...

Re: Select by... Color Label

Posted: 13 Apr 2023 22:12
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.

Re: Select by... Color Label

Posted: 14 Apr 2023 00:35
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";

Re: Select by... Color Label

Posted: 14 Apr 2023 00:52
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!

Re: Select by... Color Label

Posted: 14 Apr 2023 01:03
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.

Re: Select by... Color Label

Posted: 14 Apr 2023 01:11
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 :)

Re: Select by... Color Label

Posted: 14 Apr 2023 01:18
by jupe
If that was the whole point, you kept it a secret. You can assign a hotkey to the scripting cmd via UDC

Re: Select by... Color Label

Posted: 14 Apr 2023 01:28
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!

Re: Select by... Color Label

Posted: 14 Apr 2023 01:59
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>;

Re: Select by... Color Label

Posted: 21 Apr 2023 08:28
by admin
Label:<date dddd> ... cool idea :cup: