First, you don't absolutely need to use a ton of measures for each mathematical step, you can use your variables and measure directly in the meter. Secondly, whenever you write a formula in Rainmeter, it has to be enclosed by round brackets. So, simplifying your code a bit, and based exacly on your existing formulas from the removed measures:I am trying to make a shape color changing based on a temperature measure, but i'm clearly missing something.
[...]
My goal is to use a #Variable#, or a [Measure], to define the Stroke and the Fill colors (i mean, inplace of the 4 values separated by commas).
The shape stroke and fill color should be the same (transparency apart), and changing depending on the m_0TempPerc Measure, but when i put the math expression instead of a measure doing it, the color never changes.
Code:
[Rainmeter]Update=50AccurateText=1DynamicWindowSize=1[Metadata]Name=Test & DebugAuthor=ParduzInformation=To test and debug scripts and codeVersion=0.1License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0[Variables]TempMin=30TempMax=45;#################################################;### MEASURES ####################################;#################################################; Simulated Temperature[m_DebugLoop]Measure=LoopStartValue=#TempMin#EndValue=#TempMax#MinValue=#TempMin#MaxValue=#TempMax#DynamicVariables=1[m_PingPong]Measure=CalcIfCondition=m_DebugLoop = #TempMax#IfTrueAction=[!SetOption m_DebugLoop InvertMeasure 1][!UpdateMeasure m_DebugLoop]IfCondition2=m_DebugLoop = #TempMin#IfTrueAction2=[!SetOption m_DebugLoop InvertMeasure 0][!UpdateMeasure m_DebugLoop];#################################################;### METERS ######################################;#################################################; The temp bar[mt_Thermometer_Shp_Bg]Meter=ShapeShape=Path1 BGPath | StrokeWidth 3 | Stroke Color 0 , 255 , ((([m_DebugLoop]-#TempMin#)/(#TempMax#-#TempMin#))*128) , 255 | Fill Color 0 , 255 , ((([m_DebugLoop]-#TempMin#)/(#TempMax#-#TempMin#))*128) , 128BGPath= 20,20 | LineTo 400,20 | LineTo 400,50 | LineTo 20,50 | ClosePath 1DynamicVariables=1
P.S. An "R,G,B,A" color is a string, you cannot apply numerical formulas to it or use it in a Calc measure like you tried in [m_TempColor] and [m_TempColor1]. However, you can apply numerical formulas to each of the R, G, B or A values separately, and construct the "R,G,B,A" string based on those.
Statistics: Posted by Yincognito — Today, 1:02 pm