I've a locked mini tree on the left side and every color filter (that includes folders) that is invoked by colorfilter() paints this as well (which I'd like to avoid)
sc colorfilter() - limit to pane?
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
sc colorfilter() - limit to pane?
Is there any way to limit a colorfilter() to the pane view?
I've a locked mini tree on the left side and every color filter (that includes folders) that is invoked by colorfilter() paints this as well (which I'd like to avoid)
I've a locked mini tree on the left side and every color filter (that includes folders) that is invoked by colorfilter() paints this as well (which I'd like to avoid)
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: sc colorfilter() - limit to pane?
I thought your only option would be to disable Apply color filters to the Tree but it appears instant color filters do not currently abide that option anyhow.
Not sure how this would best be addressed...
Not sure how this would best be addressed...
- Have ICFs obey the Apply color filters to the Tree option?
- Have separate options for ICFs?
- A new control parameter to colorfilter:
Code: Select all
colorfilter([filters], [separator=||], [control=*]) control: Filters will be applied to the specified control. Accepted values: E = Everywhere (Default) (or maybe this should be '*'?) T = Tree A, I, 1, 2 = List Pane (not sure we can or should go this specific, maybe just 'L' for list.) - New switches for all color filters:
Code: Select all
t-switch: tree Applies this filter only to the Tree. +ageC:d //t|>,FFF80 l-switch: list Applies this filter only to the List. +ageC:d //l|>,FFF80
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc colorfilter() - limit to pane?
Yeah, I tried that before I posted *g*I thought your only option would be to disable Apply color filters to the Tree but it appears instant color filters do not currently abide that option anyhow.
I guess 4. would be the optimal solution because it allows me / us / everyone to assign color filters for different views (or restrict them to at least one).
The "//" as a switch type parameter won't work; iirc it's reserved for comments inside the filter but regardless of what it used it would be greatly appreciated when we don't have to colorize everything
Thanks for taking the time to create such a decent explanation of possible params!
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: sc colorfilter() - limit to pane?
Should still work - Don abused comments to add switches and pre-filters. Just need to ensure there's a pipe after them but before the comment (even if there is none).highend wrote:The "//" as a switch type parameter won't work; iirc it's reserved for comments inside the filter but regardless of what it used it would be greatly appreciated when we don't have to colorize everything
And now for some ugly hacks...
Combine the filter pattern with one of the selectors which does not work in the tree.
Code: Select all
colorfilter('dateC: < 0000 //|filter:*Apps*>,00FF00');
colorfilter('Apps AND lenT: > 0>,00FF00');Only luck I've had doing the opposite, in tree only, requires applying two filters:
Code: Select all
colorfilter(<<<ICF
Apps AND lenT: > 0 //n|>00FF00,000000
Apps>,00FF00
ICF
, "<crlf>");
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc colorfilter() - limit to pane?
Yeah, after reading the help file again... It's there^^Should still work - Don abused comments to add switches and pre-filters
I'm unsure if I understand your example correctly (didn't had any sleep in the last 24 hours).
How to define a simple ICF like this one, that matches on all files and folders in the list pane?
"Created or Modified [24 hours]" ageC: <= 24 h;ageM: <= 24 h>FFFFFF,70B926
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: sc colorfilter() - limit to pane?
As I said with multiple patterns it gets tricky.
The key is this bit from help:
The length selectors are ripe for abuse, since they are easy to force true - if you have names or paths of zero-length you probably have bigger problems.
This should highlight the items in the list only:
However, apparently there's a bug somewhere (could be in my thinking) because changing the order so that the length selectors are first does not prevent it from working in the tree: 
The key is this bit from help:
Thus to prevent a filter from working in the tree you must include a size, date, name length, or properties selector; or put another way for each pattern in your filter make it require one of these non-tree selectors also be true.::help('idh_colorfilters.htm#idh_cfoverview'); wrote:Color filters allow you to color-code the files and folders currently visible in the List pane based on various criteria like name, attributes, size, date, age, name length, and properties. Filters based on name, age and attributes optionally also work in the Tree pane.
The length selectors are ripe for abuse, since they are easy to force true - if you have names or paths of zero-length you probably have bigger problems.
This should highlight the items in the list only:
Code: Select all
colorfilter('"Created or Modified [24 hours]" ageC: <= 24 h AND lenT: > 0;ageM: <= 24 h AND lenT: > 0>FFFFFF,70B926');Code: Select all
colorfilter('"Created or Modified [24 hours]" lenT: > 0 AND ageC: <= 24 h;lenT: > 0 AND ageM: <= 24 h>FFFFFF,70B926');-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: sc colorfilter() - limit to pane?
Nice, now I got it! Thanks a lot! I'll should probably get some sleep 
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: sc colorfilter() - limit to pane?
*bump*
The original wish of being able to restrict SC ColorFilter() to list or tree only still stands.
But as we have a bit of a workaround, I'm actually just bumping this bug:
The original wish of being able to restrict SC ColorFilter() to list or tree only still stands.
But as we have a bit of a workaround, I'm actually just bumping this bug:
TheQwerty wrote:This should highlight the items in the list only:However, apparently there's a bug somewhere (could be in my thinking) because changing the order so that the length selectors are first does not prevent it from working in the tree:Code: Select all
colorfilter('"Created or Modified [24 hours]" ageC: <= 24 h AND lenT: > 0;ageM: <= 24 h AND lenT: > 0>FFFFFF,70B926');Code: Select all
colorfilter('"Created or Modified [24 hours]" lenT: > 0 AND ageC: <= 24 h;lenT: > 0 AND ageM: <= 24 h>FFFFFF,70B926');
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: sc colorfilter() - limit to pane?
* bumps the lingering
mentioned in the previous unsuccessful bump *
-
admin
- Site Admin
- Posts: 66672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc colorfilter() - limit to pane?
Fixed! (Cannot take another bump)TheQwerty wrote:* bumps the lingeringmentioned in the previous unsuccessful bump *
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: sc colorfilter() - limit to pane?
I went for this one (implemented a little different).TheQwerty wrote:New switches for all color filters:Code: Select all
t-switch: tree Applies this filter only to the Tree. +ageC:d //t|>,FFF80 l-switch: list Applies this filter only to the List. +ageC:d //l|>,FFF80
FAQ | XY News RSS | XY X
XYplorer Beta Club