death.crafter wrote: ↑November 13th, 2021, 8:44 am
What is the lua? And I can't quite figure out what you're tryna do here.
i am building a cache folder. if an extension is a video file. i extract a frame and save that in the cache folder.
on the same time i make a txt file to the frame icon.
if it is a mp3 file i extract that icon just 1 time. and make a text file in the cache folder. with the link to that icon file.
lua script has to read the txt file. and on this way i know the location of the mp3 icon file.
lua has to read this file. C:\Users\*\Documents\Rainmeter\Skins\FolderView\Folder7\Temp\..\Custom Icons\.mp3.png
and now we know how to load the image.
it does work if i put the link into the variable vFilePathRead
but i do not get it working if i do it dynamic. with SetVariable.
this is how it looks like.
wow.png
You do not have the required permissions to view the files attached to this post.
function Initialize()
sFileToRead = SELF:GetOption('FileToRead')
end
function Update()
hReadingFile = io.open(sFileToRead)
if not hReadingFile then
print('LuaTextFile: unable to open file at ' .. sFileToRead)
return
end
sAllText = hReadingFile:read("*all")
sAllText = string.gsub(sAllText, "\t", " ")
io.close(hReadingFile)
return tostring(sAllText)
end
Judian81 wrote: ↑November 13th, 2021, 9:06 am
i am building a cache folder. if an extension is a video file. i extract a frame and save that in the cache folder.
on the same time i make a txt file to the frame icon.
if it is a mp3 file i extract that icon just 1 time. and make a text file in the cache folder. with the link to that icon file.
lua script has to read the txt file. and on this way i know the location of the mp3 icon file.
lua has to read this file. C:\Users\*\Documents\Rainmeter\Skins\FolderView\Folder7\Temp\..\Custom Icons\.mp3.png
and now we know how to load the image.
it does work if i put the link into the variable vFilePathRead
but i do not get it working if i do it dynamic. with SetVariable.
this is how it looks like.
wow.png
That's a bit if a stretch. Why don't you just write to one file? You can either go for a key value strategy or section value strategy. e.g.
death.crafter wrote: ↑November 13th, 2021, 10:43 am
This will be easier to write and read. There will be problems cleaning up, but I don't think it would be that of a cliché.
i created a bat file. and now i have made a list in 1 file.
but the thing is. then i have to use a search function in lua to get the the picture that must be used with the corrensponding file.
death.crafter wrote: ↑November 13th, 2021, 10:43 am
There will be problems cleaning up, but I don't think it would be that of a cliché.
hey death.crafter,
the cliche will be there for real. maby with a time measure ment in the batch will update the exsisting files.
i just want to build a cach folder. so maby when time is changed i will over write the cache,
i use ffmpeg for different things. so i also made something for the rest of the icons. i just do not want to over write every time i enter a folder.
the cliche will be there for real. maby with a time measure ment in the batch will update the exsisting files.
i just want to build a cach folder. so maby when time is changed i will over write the cache,
i use ffmpeg for different things. so i also made something for the rest of the icons. i just do not want to over write every time i enter a folder.
thanks for everything you do.
The problem will be with cache management, yes. But it won't be a cliche as in, you can set up a proper management system. You are pretty good with c++ I take it. So, I assume you know a fair bit of powershell, or even if you don't, you can grab it easily. There is a plugin called powershellrm you can use to do the swiftly.
Basically, this would include, checking for files using Get-ChildItem. Then reading your cache file, using Get-Content. See if there is existing data about the files, if not create one and add it to the cache data and rewrite the cache data.
I can set up a system, but the problem is you may not like it or it may not suite your work flow.
Or stick with what you have. May be that is the best way to do it.
death.crafter wrote: ↑November 16th, 2021, 6:32 pm
Or stick with what you have. May be that is the best way to do it.
i think i am going to stick whit what i have build so far. but you opend my eyes about time mannagment in the cach file database.
but it is not wrong to know about power shel and that kind of stuff. i life to be a programmer.