For a webservice version skin I have set up a BaseStyle.inc and per used environment an .ini file which I include in the main.ini. Everything works fine but I would like it a bit more flexible. Now all the names of the meters and measures are in each .ini. So I have a ST1.ini where everything is named [MeasureST1], [MeterVersionST1] and so on. Adding a new environment means replacing everthing ST1 with e.g. ST2. Is it somehow possible to use a variable for meter/measure names? So I just change the variable env=ST1 to ST2.
I have tried [Measure#env#] but this doesn't work.
I've tried MeasureName=Measure#env#.
What is the best way to make this a bit more dynamic? How to make everything unique?
It is currently April 18th, 2024, 4:49 pm
Dynamic meter/measure names?
-
- Posts: 2
- Joined: February 19th, 2019, 9:45 am
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Dynamic meter/measure names?
Both are working, for example into a meter of one skin. And you even can set dynamically the env variable.edweerdt wrote: ↑February 19th, 2019, 10:46 am For a webservice version skin I have set up a BaseStyle.inc and per used environment an .ini file which I include in the main.ini. Everything works fine but I would like it a bit more flexible. Now all the names of the meters and measures are in each .ini. So I have a ST1.ini where everything is named [MeasureST1], [MeterVersionST1] and so on. Adding a new environment means replacing everthing ST1 with e.g. ST2. Is it somehow possible to use a variable for meter/measure names? So I just change the variable env=ST1 to ST2.
I have tried [Measure#env#] but this doesn't work.
I've tried MeasureName=Measure#env#.
What is the best way to make this a bit more dynamic? How to make everything unique?
For example:
Code: Select all
[Variables]
env=1
[MeasureST0]
Measure=Calc
Formula=10
[MeasureST1]
Measure=Calc
Formula=23
[Meter]
Meter=STRING
MeasureName=MeasureST#env#
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1 / [MeasureST#env#]
DynamicVariables=1
LeftMouseUpAction=[!SetVariable env "(1-#env#)"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Code: Select all
[MeasureST#env#]
Measure=Calc
Formula=#env#
DynamicVariables=1
-
- Posts: 2
- Joined: February 19th, 2019, 9:45 am
Re: Dynamic meter/measure names?
My search ends with your answer. Thank you for your time and reply.
-
- Rainmeter Sage
- Posts: 16144
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania