I have a basic question about FileView.
Everything i added to the skin is working properly, so I have one more question:
Can FileView be used to identify and programmatically access the folderpath, and write that value to a saved variable.
I am just following the path of folders, then when necessary save that location <-- works great.
The next step is to try and dynamically run any exe or doc file from the saved path, sort of like a launcher?
I hope I explained that properly, I was confused just asking those questions.
It is currently April 24th, 2024, 3:41 am
[solved] ok. New Topic [yay] FileView & file path confusion.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
[solved] ok. New Topic [yay] FileView & file path confusion.
Last edited by CodeCode on December 21st, 2021, 4:25 am, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: ok. New Topic [yay]
I am not sure what you are trying to achieve...CodeCode wrote: ↑December 20th, 2021, 9:06 pm I have a basic question about FileView.
Everything i added to the skin is working properly, so I have one more question:
Can FileView be used to identify and programmatically access the folderpath, and write that value to a saved variable.
I am just following the path of folders, then, when necessary, save that location <-- works great.
The next step is to try and dynamically run any exe or doc file from the saved path, sort of like a launcher?
I hope I explained that properly, I was confused just asking those questions.
FileView can 'launch' any child measure's Windows associated file using the 'Open' command:
[!CommandMeasure "ChildMeasureName" "Open"].
If you are only saving the folder path (as you stated above) then you cannot know what files are in that path, unless you also save the child value, in order to launch (open) a file that was found previously.
You could use another FileView parent, with that path, and have child measures for the actual files, and use the 'open' command to launch them. But that is a bit overkill, since at some previous point you knew the path and file you wanted from the first FileView measures.
If you explain exactly what you hope to happen, step by step, perhaps there is another solution.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: ok. New Topic [yay]
I would like to have it work likea dis:eclectic-tech wrote: ↑December 20th, 2021, 11:00 pm If you explain exactly what you hope to happen, step by step, perhaps there is another solution.
I have an indexed list with lots of things going on. So there are a set number of 7 indexed at a time, and that is all you can see at one time: 7 or less that is.
In each index there is a string that serves as the file name
each index has its own child measure that uses fileview to be able to click into that index where the folders lead to sub folders and files - each index has all of its own child measures specifically this one:
Code: Select all
[mFilePath1]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=PathToFile
Group=Children
Then save that path including the file and its extension (so it can be opened with the open command) to a variable for later use.
I hope that makes sense, I doesnt 'seem' convoluted, but i am sure it possibly looks that way.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: ok. New Topic [yay]
I understand that you have up to 7 Fileview items.
So you mean you have a FileView child measure with an Index number and a Type=Filename for all 7 counts?CodeCode wrote:In each index there is a string that serves as the file name
Where is the Index number for that FileView measure? I assume it is Index=1.CodeCode wrote:each index has its own child measure that uses fileview to be able to click into that index where the folders lead to sub folders and files - each index has all of its own child measures specifically this one:Code: Select all
[mFilePath1] Measure=Plugin Plugin=FileView Path=[mPath] Type=PathToFile Group=Children
The FileView Command 'FollowPath' is how you are navigating, correct? There are only 2 FileView child commands: FollowPath or Open. Those are the only 2 actions available (see Open example below).
All you need is to create an additional child measure(s) with Type=FilePath for each of your 7 Indexes...CodeCode wrote:I would like to be able to right click on the string that links through that measure, get its full path, including a file name if that is what is clicked.
Then save that path including the file and its extension (so it can be opened with the open command) to a variable for later use.
I hope that makes sense, I doesnt 'seem' convoluted, but i am sure it possibly looks that way.
Code: Select all
[mFile1]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FilePath
Index=1
Group=Children
RightMouseUpAction=[!WriteKeyValue Variables "Launch1" "[mFile1]"][!SetVariable "Launch1" "[mFile1]"]
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 1399
- Joined: April 24th, 2021, 8:13 pm
Re: ok. New Topic [yay]
I think we should rewrite fileview to support inline variables. Making a new measure for everything is weird.eclectic-tech wrote: ↑December 21st, 2021, 2:35 am I understand that you have up to 7 Fileview items.
So you mean you have a FileView child measure with an Index number and a Type=Filename for all 7 counts?
Where is the Index number for that FileView measure? I assume it is Index=1.
The FileView Command 'FollowPath' is how you are navigating, correct? There are only 2 FileView child commands: FollowPath or Open. Those are the only 2 actions available (see Open example below).
All you need is to create an additional child measure(s) with Type=FilePath for each of your 7 Indexes...This will give you "Full path and name of indexed object, folder or file. No trailing "\" with folders" that you can save as a variable.Code: Select all
[mFile1] Measure=Plugin Plugin=FileView Path=[mPath] Type=FilePath Index=1 Group=Children
RightMouseUpAction=[!WriteKeyValue Variables "Launch1" "[mFile1]"][!SetVariable "Launch1" "[mFile1]"]
from the Realm of Death
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: ok. New Topic [yay]
This works nicely! I missed the difference between PathtoFile and FilePath. So woot! This thread is a noted success.eclectic-tech wrote: ↑December 21st, 2021, 2:35 amThis will give you "Full path and name of indexed object, folder or file. No trailing "\" with folders" that you can save as a variable.Code: Select all
[mFile1] Measure=Plugin Plugin=FileView Path=[mPath] Type=FilePath Index=1 Group=Children
RightMouseUpAction=[!WriteKeyValue Variables "Launch1" "[mFile1]"][!SetVariable "Launch1" "[mFile1]"]
Thanks
ET
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: ok. New Topic [yay]
That would make it easier to use and understand... the Parent/Child concept learning curve can be pretty steep to climb!death.crafter wrote: ↑December 21st, 2021, 4:13 am I think we should rewrite fileview to support inline variables. Making a new measure for everything is weird.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 5406
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: [solved] ok. New Topic [yay] FileView & file path confusion.
Happy to help!
TitanDrive is a pretty cool skin you created
TitanDrive is a pretty cool skin you created
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: [solved] ok. New Topic [yay] FileView & file path confusion.
Thanks ET.eclectic-tech wrote: ↑December 21st, 2021, 4:27 am Happy to help!
TitanDrive is a pretty cool skin you created
I feel like I am learning a lot faster then just a couple months ago.
Before that was being really good at stripping down skin codes from any author, remove everything but the bare vestiges needed for my design.
Titan Drives has been really fun to make. It helped a lot by the folks around here-parts.
Adding the exe shortcuts is going well.
Still doing some self redacting, to reduce the amount of mouse clicks that are needed to see Titans working in all its ability, and by any end user.
Non scripters of the rainmeter community should pick up the intrinsics just by operating the ui, with as little as possible the need to edit files.
I would try making a settings skin with click managed settings, but those things are so convoluted and break often from my reckoning.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: ok. New Topic [yay]
Ok. So the path copies into the variable perfectly.eclectic-tech wrote: ↑December 21st, 2021, 2:35 am This will give you "Full path and name of indexed object, folder or file. No trailing "\" with folders" that you can save as a variable.
RightMouseUpAction=[!WriteKeyValue Variables "Launch1" "[mFile1]"][!SetVariable "Launch1" "[mFile1]"]
But when I try to access the variable the path is there but it gets a trailing "\"
The string measures for each short cut are a great place to put some kind of reg exp or substitute.
I dont know how to get that trailing \ to either be ignored or removed dynamically, so the path actually opens the file. Currently the trailing backslash forces the skin to look for a directory, but there would not be any such thing.
Here is one of the string measures. It has the variable for a given shortcut [#FileFive] in this case. So a test against the whole string can be done here. I just dont know how exactly.
Code: Select all
[mFile5]
Measure=String
String=[#FileFive]
IfMatch=^$
IfMatchAction=[!SetVariable FileFive [#FileSet]][!WriteKeyValue Variables FileFive [#FileSet] "#@#TitanVars.inc"][!UpdateMeter Meterv]
IfNotMatchAction=[!Update]
IfMatch2=^THIS PC$
IfMatchAction2=[!SetOption Meterv Hidden "1"]
IfNotMatchAction2=[!SetOption Meterv Hidden "0"]
DynamicVariables=1
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.