function Initialize()
sFileToWrite = SELF:GetOption('FileToWrite')
end -- function Initialize
function Update()
hWritingFile = io.open(sFileToWrite)
if not hWritingFile then
print('LuaWriteFile: unable to open file at ' .. sFileToWrite)
return
end
sContents = SELF:GetOption('Contents')
return sContents
end -- function Update
function writeToFile(Contents)
file = io.open("C:\\Users\\total\\OneDrive\\Documents\\Rainmeter\\Skins\\TestSkin\\Main\\input.txt", "a")
file:write(Contents, "\n")
file:close()
end
function Initialize()
sFileToWrite = SELF:GetOption('FileToWrite')
end -- function Initialize
function Update()
hWritingFile = io.open(sFileToWrite)
if not hWritingFile then
print('LuaWriteFile: unable to open file at ' .. sFileToWrite)
return
end
sContents = SELF:GetOption('Contents')
return sContents
end -- function Update
function writeToFile(Contents)
file = io.open(sFileToWrite, "a")
file:write(Contents, "\n")
file:close()
end
I would note that I can't get that emoji of the magnifying glass to work with the default Arial font, and the Unicode representation is outside the boundaries of the Basic Multilingual Plane, so I would be tempted to use Font Awesome instead. https://docs.rainmeter.net/manual/variables/character-variables/#FindingValues
But if that is working for you, good on you.
... Or you could just include an image file.
SearchLeft.png
SearchRight.png
You do not have the required permissions to view the files attached to this post.
jsmorley wrote: ↑March 6th, 2019, 1:44 pm
Not quite sure what you are getting. That skin/script seems to always work for me.
I did make a small change to how the file is opened for append, to eliminate the hard-coded file name.
...
I would note that I can't get that emoji of the magnifying glass to work with the default Arial font, and the Unicode representation is outside the boundaries of the Basic Multilingual Plane, so I would be tempted to use Font Awesome instead. https://docs.rainmeter.net/manual/variables/character-variables/#FindingValues But if that is working for you, good on you.
Updated the code for write and it seems to work again. Hope it lasts. Thanks a lot.