Variable for "Total files in File Window" available?

Started by axel.hennig, April 13, 2023, 03:09:13 PM

Previous topic - Next topic

axel.hennig

Does there exist a variable for "Total files in File Window"?

I would like to make a File Window Layout using the "Index" together with "Total files in File Window", e.g. something like: 27 / 156

Mario

Nope, sorry. There are no File Window variables...?

There is an Index layout attribute you can use, but this cannot be used in a variable.
The number of files in the File Window is displayed in the File Window caption but currently not accessible as an layout attribute.

I could implement a new attribute like Number of Files, but then some users would want to display it as "x / n", others as "x of n" or "x von n" or whatever. And that would mean adding multiple "n" attributes for common formats, or adding a new layout property for this attribute that allows the user to control how x and n are formatted...

And when we have "Number of files" as an attribute, what about "Number of selected files", "Number of stacked files", "Number of files hidden by a stack" etc.

All doable. But how many users will ever need "Number of files" or "x of n" as a File Window layout attribute?
I suggest you add a feature request so I can see if there is some interest for this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

And not to forget  total Files in categories. :) 
Best wishes from Switzerland! :-)
Markus

axel.hennig

Quote from: sinus on April 13, 2023, 06:34:28 PMAnd not to forget  total Files in categories. :)
Hi Markus,

this I don't understand. If I would select a category the "Total files in File Window" would be equal to "Total files in Categories". At least to my understanding, or do I miss something?

axel.hennig

Quote from: Mario on April 13, 2023, 04:20:38 PMI could implement a new attribute like Number of Files, but then some users would want to display it as "x / n", others as "x of n" or "x von n" or whatever. And that would mean adding multiple "n" attributes for common formats, or adding a new layout property for this attribute that allows the user to control how x and n are formatted...

Not sure if "x / n" or "x of n" or "x von n" would be needed. I think just "n" would be needed. All the other things would be doable by just using a "Custom template" with two variables, like: "{INDEX} / {TotalFilesInFileWindow}" or "{INDEX} of {TotalFilesInFileWindow}" and so on.

Mario

Quote from: axel.hennig on April 13, 2023, 09:10:18 PMNot sure if "x / n" or "x of n" or "x von n" would be needed. I think just "n" would be needed. All the other things would be doable by just using a "Custom template" with two variables, like: "{INDEX} / {TotalFilesInFileWindow}" or "{INDEX} of {TotalFilesInFileWindow}" and so on.
There are no File Window variables. Index is a layout attribute, not accessible in variables. Same would be true for the "number of" layout attribute. You cannot combine it in a custom template, because these are not variables.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: axel.hennig on April 13, 2023, 09:06:47 PM
Quote from: sinus on April 13, 2023, 06:34:28 PMAnd not to forget  total Files in categories. :)
Hi Markus,

this I don't understand. If I would select a category the "Total files in File Window" would be equal to "Total files in Categories". At least to my understanding, or do I miss something?
Sorry, Axel
I was not clear enough.
You can see the amount of files next each category. What I would like to have, is having a variable, what would have as a result this number.

Like a category - tree
Fruits (19)
- Apple (9)
- Banana (4)
- Rasberry (6)

I would like to have access on the numbers for each number.
For using this in the File Window this would not be interesting, like you pointed out correctly.

But having such variables would bei very helpful for "Design & Print", where we can work with several categories.

Best wishes from Switzerland! :-)
Markus

axel.hennig


axel.hennig

Quote from: Mario on April 13, 2023, 09:55:27 PMThere are no File Window variables. Index is a layout attribute, not accessible in variables. Same would be true for the "number of" layout attribute. You cannot combine it in a custom template, because these are not variables.

That's why I've added the "Index" also to my Feature Request.

Jingo

If I am understanding what you are looking for, you can show "selected/Total" in the tab header with result windows... maybe a workaround?  See my "Result Window" app for an example on how to set this up via code if needed.

axel.hennig

Thanks Jingo, but that's not what I'm looking for. I would like to have these information available for File Window Layouts.

Mario

Quote from: sinus on April 14, 2023, 08:32:07 AMSorry, Axel
I was not clear enough.
You can see the amount of files next each category. What I would like to have, is having a variable, what would have as a result this number.

Like a category - tree
Fruits (19)
- Apple (9)
- Banana (4)
- Rasberry (6)

I would like to have access on the numbers for each number.
For using this in the File Window this would not be interesting, like you pointed out correctly.

But having such variables would bei very helpful for "Design & Print", where we can work with several categories.

When I understand you correctly, you want variables for arbitrary categories, e.g. a variable that returns the number of files in a category named Rasberry.

Like {Category[Path].Property...}

For example: {Category[Rasberry].FileCount} or {Category[^Motive\|Outdoor].FileCount} to process all categories starting with Motive|Outdoor and count their files. Allowing to process only one category would be far too limiting.

To implement this would be quite challenging.

Variables need a context. For example, in a context where the user has access to file variables like {File.FullName} IMatch prepares a context, sets the "current" file, and then a mechanism is triggered that loads the data of the file in the most efficient way, utilizing caching and other things to make things work quickly.

To parse and process variables like the ones I show above, IMatch would have to look for variables starting with {Category and then parse and process the path in the []. And for each category resulting from that produce the result based on whatever property is requested, e.g. FileCount or maybe Color or FileSize or whatever.

Doable? Yes.
Complicated and expensive? BIG yes.
Potential number of users who need this?  My guess would very very few. But I was wrong before.

I know that you do very complex layouts in Design & Print. And I guess this is what you would need this special kind of variables for. But I doubt many other users would see a need for this.

Feel free to make a detailed feature request, with a link to this post.
Then we'll see how many users would see a need for this.

I'm all in to make IMatch better and more useful - if there is a sufficiently large number of users who would benefit from a feature. And the more complex (aka expensive) a feature is, the more user I would like to see in this group.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on April 14, 2023, 07:09:39 PM
Quote from: sinus on April 14, 2023, 08:32:07 AMSorry, Axel
I was not clear enough.
You can see the amount of files next each category. What I would like to have, is having a variable, what would have as a result this number.

Like a category - tree
Fruits (19)
- Apple (9)
- Banana (4)
- Rasberry (6)

I would like to have access on the numbers for each number.
For using this in the File Window this would not be interesting, like you pointed out correctly.

But having such variables would bei very helpful for "Design & Print", where we can work with several categories.

When I understand you correctly, you want variables for arbitrary categories, e.g. a variable that returns the number of files in a category named Rasberry.

Like {Category[Path].Property...}

For example: {Category[Rasberry].FileCount} or {Category[^Motive\|Outdoor].FileCount} to process all categories starting with Motive|Outdoor and count their files. Allowing to process only one category would be far too limiting.

To implement this would be quite challenging.
You are correct, I think.
If I have a main-category with sub-cats, I want be able to have access on the amount of each sub-cats, in this case on

Fruits (19)
- Apple (9)
- Banana (4)
- Raspberry (6)

means
main-cat (19)
sub-1 (9)
sub-2 (4)
sub-3 (6)

Quote from: Mario on April 14, 2023, 07:09:39 PMVariables need a context. For example, in a context where the user has access to file variables like {File.FullName} IMatch prepares a context, sets the "current" file, and then a mechanism is triggered that loads the data of the file in the most efficient way, utilizing caching and other things to make things work quickly.

To parse and process variables like the ones I show above, IMatch would have to look for variables starting with {Category and then parse and process the path in the []. And for each category resulting from that produce the result based on whatever property is requested, e.g. FileCount or maybe Color or FileSize or whatever.
Really interesting!
Thanks for the explanation, they are always very interesting. Stuff to think about it.

Me as a simple user thinks, hey, the numbers are there already, I want to use them simply.

But I can see, this is not that easy, like I think.


Quote from: Mario on April 14, 2023, 07:09:39 PMDoable? Yes.
Complicated and expensive? BIG yes.
Potential number of users who need this?  My guess would very very few. But I was wrong before.

I know that you do very complex layouts in Design & Print. And I guess this is what you would need this special kind of variables for. But I doubt many other users would see a need for this.

You are correct again.
I have very complex Layouts for Design & Print.
And yes, this is for what I would need such variables.
And yep, not a lot of users would need them, I guess.

Quote from: Mario on April 14, 2023, 07:09:39 PMFeel free to make a detailed feature request, with a link to this post.
Then we'll see how many users would see a need for this.

I'm all in to make IMatch better and more useful - if there is a sufficiently large number of users who would benefit from a feature. And the more complex (aka expensive) a feature is, the more user I would like to see in this group.
I will think about this and maybe will create a Feature request for this, although I am with you, not many users will be interested into this.

But it would give me/us the possibility to create e.g. an index for a document, based on several categories with dynamic templates.
Best wishes from Switzerland! :-)
Markus