It is currently March 29th, 2024, 7:09 am
Get help with creating, editing & fixing problems with skins
EnhancedJax
Posts: 19 Joined: October 17th, 2020, 11:57 am
Post
by EnhancedJax » August 7th, 2021, 1:13 pm
Code: Select all
[Rainmeter]
Update=100
[Variables]
Scale=1
Width=(10*#Scale#)
[Loop]
Measure=Calc
OnUpdateAction=[!SetVariable Scale (#Scale#+0.1)][!UpdateMeter Item]
DynamicVariables=1
[Item]
Meter=Image
MeterStyle=2
SolidCOlor=255,0,0
DynamicVariables=1
[1]
W=(#Scale#*10)
H=(#Scale#*10)
[2]
W=#Width#
H=#Width#
Currently 1 works, but I want 2 to work in the same way as one does. Any ideas?
Yincognito
Rainmeter Sage
Posts: 7029 Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita
Post
by Yincognito » August 7th, 2021, 2:40 pm
EnhancedJax wrote: ↑ August 7th, 2021, 1:13 pm Currently 1 works, but I want 2 to work in the same way as one does. Any ideas?
You have 2 choices:
1. Add a
[!SetVariable Width (10*#Scale#)] to the OnUpdateAction, to correspondingly set Width as well:
Code: Select all
[Rainmeter]
Update=100
[Variables]
Scale=1
Width=(10*#Scale#)
[Loop]
Measure=Calc
OnUpdateAction=[!SetVariable Scale (Clamp(#Scale#+0.1,1,10))][!SetVariable Width (10*#Scale#)][!UpdateMeter Item]
DynamicVariables=1
[Item]
Meter=Image
W=#Width#
H=#Width#
SolidColor=255,0,0
DynamicVariables=1
2. Use
nested syntax when setting Width in
[Variables] to let Rainmeter automatically do its dynamic setting, but very important, place defining the Width
before defining the Scale (alternatively, you could place it afterwards, if you
escape the Scale variable, like
Width=(10*[#*Scale*]) ):
Code: Select all
[Rainmeter]
Update=100
[Variables]
Width=(10*[#Scale])
Scale=1
[Loop]
Measure=Calc
OnUpdateAction=[!SetVariable Scale (Clamp(#Scale#+0.1,1,10))][!UpdateMeter Item]
DynamicVariables=1
[Item]
Meter=Image
W=#Width#
H=#Width#
SolidColor=255,0,0
DynamicVariables=1
EnhancedJax
Posts: 19 Joined: October 17th, 2020, 11:57 am
Post
by EnhancedJax » August 8th, 2021, 7:50 am
Thankyou! The solutions are wonderful
Yincognito
Rainmeter Sage
Posts: 7029 Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita
Post
by Yincognito » August 8th, 2021, 10:05 am
EnhancedJax wrote: ↑ August 8th, 2021, 7:50 am
Thankyou! The solutions are wonderful
No problem - glad to help.