It is currently April 20th, 2024, 3:47 am
Get help with creating, editing & fixing problems with skins
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » February 15th, 2016, 12:31 pm
Maybe this is not what you are looking for, but I found this solution:
skin.ini
Code: Select all
[Rainmeter]
Update=1000
OnRefreshAction=[!EnableMeasure MeasureDummy][!UpdateMeasure MeasureDummy]
[Variables]
@include=#@#Construction\core.inc
@include2=#@#Settings\timetable.inc
[MeasureDummy]
Measure=Script
ScriptFile=luatest.lua
Disabled=1
[TBL_11_TC_C]
Meter=Image
MeterStyle=CnsTblCell
[TBL_12_TC_C]
Meter=Image
MeterStyle=CnsTblCell
[TBL_13_TC_C]
Meter=Image
MeterStyle=CnsTblCell
core.inc
Code: Select all
[CnsTblCell]
DynamicVariables=1
UpdateDivider=-1
Group=GrpCell
X=0
Y=5R
W=150
H=30
SolidColor=45,45,45,150
timetable.inc
Code: Select all
[Variables]
TBL_11_TC_C=C:\
TBL_12_TC_C=C:\Users
TBL_13_TC_C=C:\Windows
luatest.lua
Code: Select all
function Initialize()
mt = {} -- create the matrix
for i=1,1 or nill do
mt[i] = {} -- create a new row
for j=1,3 or nill do
mt[i][j] = '#TBL_'..i..j..'_TC_C#'
SKIN:Bang('!SetOption', 'TBL_'..i..j..'_TC_C', 'LeftMouseUpAction', '['..'"'..mt[i][j]..'"'..']')
end
end
end
function Update()
end
Active Colors
Moderator
Posts: 1251 Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Post
by Active Colors » February 15th, 2016, 8:24 pm
FreeRaider, the log throws me error: [MeasureDummy] | Script: File not valid
With my little lua knowledge I see no mistakes in your code, but sadly I don't understand what can cause rainmeter to show this type of error.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » February 15th, 2016, 9:51 pm
Really weird, it works for me.
I have put luatest.lua [with encoding UTF-8 (in notepad++)] in same folder of skin.ini
Active Colors
Moderator
Posts: 1251 Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Post
by Active Colors » February 15th, 2016, 11:08 pm
FreeRaider wrote: Really weird, it works for me.
I have put luatest.lua [with encoding UTF-8 (in notepad++)] in same folder of skin.ini
Can you please make a .rmskin of this skin? I just don't see what I miss here.
Oh my, I had put it into a wrong skin folder. My, my. Sorry, I have lack of sleep these days. Thank you so much for the lua script. It works just great.
I have one question. How do I expand it? I mean, I have here not only TBL_11_TC_C and TBL_12_TC_C, but also
TBL_21_TC_C - TBL_29_TC_C, TBL_31_TC_C - TBL_39_TC_C, etc.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » February 15th, 2016, 11:19 pm
Of course.
You do not have the required permissions to view the files attached to this post.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » February 15th, 2016, 11:24 pm
We suppose that you start from TLB_11_TC_C to TLB_39_TC_C
In lua script there are "i" (rows) and "j" (columns),
Code: Select all
...
for i=1,3 or nill do
mt[i] = {}
for j=1,9 or nill do
mt[i][j] = '#TBL_'..i..j..'_TC_C#'
...
Active Colors
Moderator
Posts: 1251 Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany
Post
by Active Colors » February 15th, 2016, 11:41 pm
FreeRaider wrote: We suppose that you start from TLB_11_TC_C to TLB_39_TC_C
In lua script there are "i" (rows) and "j" (columns),
Code: Select all
...
for i=1,3 or nill do
mt[i] = {}
for j=1,9 or nill do
mt[i][j] = '#TBL_'..i..j..'_TC_C#'
...
You just can't imagine how happy I am now. Thank you so much, mate!
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » February 15th, 2016, 11:48 pm
And I am glad you like this solution.