Hi!
I want to suggest that extend-modifiers of shape-meters should extend to not only being static strings but should have the possibility to be measures (the string-values) and/or simple expressions that results in strings.
So they can automatically adapt to certain rules the measures/expressions are calculating.
If i want to change more than one Attribute-Modifiers and/or Transform-Modifiers at once this possibility would be handy.
What do you think?
Edit: the same for the Path
It is currently March 28th, 2024, 3:41 pm
[Suggestion] Shape/Extend-Modifier and path: Measures and expressions
- ikarus1969
- Posts: 571
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Suggestion] Shape/Extend-Modifier and path: Measures and expressions
But as far as I can tell, this is already possible. No need of anything for this.ikarus1969 wrote:I want to suggest that extend-modifiers of shape-meters should extend to not only being static strings but should have the possibility to be measures (the string-values) and/or simple expressions that results in strings.
Eventually post a code, to can take a look.
- ikarus1969
- Posts: 571
- Joined: February 28th, 2011, 3:20 pm
- Location: Vienna, Austria
Re: [Suggestion] Shape/Extend-Modifier and path: Measures and expressions
I have something like this in mind:
Example #1: switching Extend-Modifier with an expression
Example #2: switching Extend-Modifier with a measure: in the meantime i got it working with a measure
Example #1: switching Extend-Modifier with an expression
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
Switch_Format=0
[Measure_CALC]
Measure=CALC
Formula=#Switch_Format#
OnUpdateAction=[!SetVariable "Switch_Format" "(1 - #Switch_Format#)"][!UpdateMeter "*"][!Redraw]
DynamicVariables=1
[Meter_Display]
Meter=SHAPE
Shape=Ellipse 100, 100, 90, 90 | Extend (#Switch_Format# = 0 ? "Format_RED" : "Format_BLUE")
Format_RED= StrokeWidth 6 | Stroke Color FF0000FF | Fill Color FFFFFFFF
Format_BLUE=StrokeWidth 6 | Stroke Color 004080FF | Fill Color FFFFFFFF
AntiAlias=1
DynamicVariables=1
[Meter_Var]
Meter=STRING
Text="#Switch_Format#"
X=100
Y=100
InlineSetting=Size | 48
StringAlign=CENTERCENTER
AntiAlias=1
DynamicVariables=1
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
Switch_Format=0
[Measure_CALC]
Measure=CALC
Formula=#Switch_Format#
OnUpdateAction=[!SetVariable "Switch_Format" "(1 - #Switch_Format#)"][!UpdateMeasure "Measure_CALC_Format"][!UpdateMeter "*"][!Redraw]
DynamicVariables=1
[Measure_CALC_Format]
Measure=STRING
String=#Switch_Format#
Substitute="0":"Format_RED","1":"Format_BLUE"
DynamicVariables=1
[Meter_Display]
Meter=SHAPE
Shape=Ellipse 100, 100, 90, 90 | Extend [Measure_CALC_Format]
Format_RED= StrokeWidth 6 | Stroke Color FF0000FF | Fill Color FFFFFFFF
Format_BLUE=StrokeWidth 6 | Stroke Color 004080FF | Fill Color FFFFFFFF
AntiAlias=1
DynamicVariables=1
[Meter_Var]
Meter=STRING
Text="#Switch_Format#"
X=100
Y=100
InlineSetting=Size | 48
StringAlign=CENTERCENTER
AntiAlias=1
DynamicVariables=1
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Suggestion] Shape/Extend-Modifier and path: Measures and expressions
The formulas (like that used under the Extend part of the shape option of the [Meter_Display] meter) work ONLY with numeric values, strings aren't allowed. However a !SetOption bang can be used to set the appropriate option on the Shape meter:ikarus1969 wrote:Example #1: switching Extend-Modifier with an expression
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
Switch_Format=0
[Measure_CALC]
Measure=CALC
Formula=#Switch_Format#
OnUpdateAction=[!SetVariable "Switch_Format" "(1 - #Switch_Format#)"][!UpdateMeter "*"][!Redraw]
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption Meter_Display Shape "Ellipse 100, 100, 90, 90 | Extend Format_RED"][!UpdateMeter "Meter_Display"][!Redraw]
IfFalseAction=[!SetOption Meter_Display Shape "Ellipse 100, 100, 90, 90 | Extend Format_BLUE"][!UpdateMeter "Meter_Display"][!Redraw]
DynamicVariables=1
[Meter_Display]
Meter=SHAPE
;Shape=Ellipse 100, 100, 90, 90 | Extend (#Switch_Format# = 0 ? "Format_RED" : "Format_BLUE")
Format_RED= StrokeWidth 6 | Stroke Color FF0000FF | Fill Color FFFFFFFF
Format_BLUE=StrokeWidth 6 | Stroke Color 004080FF | Fill Color FFFFFFFF
AntiAlias=1
DynamicVariables=1
[Meter_Var]
Meter=STRING
Text=#Switch_Format#
X=100
Y=100
InlineSetting=Size | 48
StringAlign=CENTERCENTER
AntiAlias=1
DynamicVariables=1
This code works perfectly for me, without any modification. Doesn't it for you?ikarus1969 wrote:Example #2: switching Extend-Modifier with a measure: in the meantime i got it working with a measure