Not particularly interested in this since I don't use the plugin on a constant basis, but working a bit with FileView, I thought it would be both easy to implement internally (e.g. based on the value of Type=FileName child measures or otherwise) and useful for skin designers to have a Type=FileExists option in a FileView child measure. That would avoid having to use IfMatches (which unnecessarily adds to the skin verbosity or complexity), the size of the extracted icon (which might or might not be used) for each child measure, or a bunch of variables, in order to detect which of the associated meters should be hidden or not.
Type=FileSize would have been otherwise suited for such a check since it returns numeric values which can be used in the Hidden option of meters via conditionals, except that 0 byte files can exist. Type=FileCount would have been another candidate, except that it isn't related in any way to the IndexUp / IndexDown command bangs. The rest are string based values that lead us back to the IfMatches and separate variables or !SetOptions to set the Hidden option on the associated meters (which might or might not have a similar name with the FileView child measures, another slight inconvenience in practice).
On a second thought, since the numeric value of the Type=FileName child measure is not used at the moment anyway, an even more compact approach to this would be to have it indicate file existence via some 0 or 1 values, which could then be used via the : section variable parameter in the Hidden option of associated meters. I imagine neither approach would affect backward compatibility, by the way.
It is currently October 3rd, 2024, 10:56 pm
[Feature Request] Type=FileExists option for FileView child measures
-
- Rainmeter Sage
- Posts: 8324
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 1821
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: [Feature Request] Type=FileExists option for FileView child measures
Thanks for suggesting this. It would reduce complexity considerably in my skin.
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 16623
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Feature Request] Type=FileExists option for FileView child measures
Might be useful indeed, however a lua script file can easily detect if a file exist. In its basic format the script file is short enough (4 lines) and accepts inline call of the appropriate function, returning 1 (or true) when the file exists and 0 (false) when it doesn't exist. This makes me wonder if a new value worth to be added to the FileView existing plugin. I think this depends on how complicate this can be implemented.Yincognito wrote: ↑September 27th, 2024, 9:33 am Not particularly interested in this since I don't use the plugin on a constant basis, but working a bit with FileView, I thought it would be both easy to implement internally (e.g. based on the value of Type=FileName child measures or otherwise) and useful for skin designers to have a Type=FileExists option in a FileView child measure.
-
- Rainmeter Sage
- Posts: 8324
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: [Feature Request] Type=FileExists option for FileView child measures
Indeed, that's a good alternative since it's numeric and can easily be used in the Hidden options. Well, as you said, it's up to the devs to weigh in on that - I did my part to raise the possibility.balala wrote: ↑October 1st, 2024, 9:21 am Might be useful indeed, however a lua script file can easily detect if a file exist. In its basic format the script file is short enough (4 lines) and accepts inline call of the appropriate function, returning 1 (or true) when the file exists and 0 (false) when it doesn't exist. This makes me wonder if a new value worth to be added to the FileView existing plugin. I think this depends on how complicate this can be implemented.