I made a skin that instantly displays the last 5 messages in the Rainmeter Log file content.
(This number can be increased)
I believe it can help in some cases
![Tongue Phhht :phhht](./images/smilies/ao.gif)
Skin ini
Code: Select all
[Rainmeter]
Update=1000
[Variables]
LogFile="#SETTINGSPATH#Rainmeter.log"
LastWritten1=
LastWritten2=
LastWritten3=
LastWritten4=
LastWritten5=
[MeaLua]
Measure=Script
ScriptFile="#CURRENTPATH#LuaWrite.lua"
FileName=#Path#
[MtrShape]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,306,178 | Extend MyModifiers1
MyModifiers1=Fill Color 0,0,0 | StrokeWidth 2 | Stroke Color 255,0,0
[Strtime]
Meter=String
X=4
Y=4
W=300
H=174
SolidColor=0,0,0
StringStyle=Normal
StringAlign=Left
FontSize=10
FontFace=URW DIN SemiCond W05 Demi
FontColor=240,240,240
ClipString=1
Text=#LastWritten1##CRLF##LastWritten2##CRLF##LastWritten3##CRLF##LastWritten4##CRLF##LastWritten5#
AntiAlias=1
DynamicVariables=1
Code: Select all
function Initialize()
FileName = SKIN:GetVariable('LogFile')
end
function Update()
FilePath = SKIN:MakePathAbsolute(FileName)
local file = io.open(FilePath, 'r')
fLines = {}
for line in file:lines() do
table.insert(fLines, line)
end
local count = 0
for line in io.lines(FilePath) do
count = count + 1
end
file:close()
cLine = count - 1
SKIN:Bang('!SetVariable', 'LastWritten1', fLines[cLine + 1])
SKIN:Bang('!SetVariable', 'LastWritten2', fLines[cLine])
SKIN:Bang('!SetVariable', 'LastWritten3', fLines[cLine - 1])
SKIN:Bang('!SetVariable', 'LastWritten4', fLines[cLine - 2])
SKIN:Bang('!SetVariable', 'LastWritten5', fLines[cLine - 3])
end