I'm fairly new to Rainmeter and running into some issues with the !SetOption Bang not appropriately triggering within an IfCondition.
Relevant Code:Full code is available but is quite large and contains some sensitive login info for a WebParser that I haven't abstracted yet. Can provide whatever context is needed if this is not sufficient to debug.
The Result:
Color remains #ColorText# in all situations (double checked condition values in the log and the IfConditions should definitely be triggering)
Things I've already tried:
Adding !UpdateMeter and !Redraw (as is still included because I believe it's standard practice for this?)
Surrounding values in quotations (e.g. "FontColor" "#ColorRed#", etc.) -- Color values include no spaces
Using !SetValue instead of !SetOption
Workaround:This works and I could honestly use this to get from A to B for my current issue quite easily but, as I said, I'm new to Rainmeter and want to understand what it is I'm misunderstanding here
Version / System Info:
Rainmeter 4.5.20.3803 (64-bit)
Language: English (1033)
Build time: 2024-08-27 15:17:14
Windows 10 Home 22H2 (build 19045.4894) 64-bit - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\myname\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\myname\AppData\Roaming\Rainmeter\
IniFile: C:\Users\myname\AppData\Roaming\Rainmeter\Rainmeter.ini
Relevant Code:
Code:
[MaxValMeter]Meter=StringX=(#pad.X#-(#pad.X#/2))Y=(#pad.Y#)Text="#GraphUpperBound#"FontSize=12FontWeight=500FontColor=#ColorText#Hidden=#hide.nums#IfCondition=(#GraphUpperBound# < #LowValueAlert#)IfTrueAction=[!SetOption MaxValMeter FontColor #ColorRed#][!UpdateMeter MaxValMeter][!Redraw]IfCondition2=(#GraphUpperBound# > #HighValueAlert#)IfTrueAction2=[!SetOption MaxValMeter FontColor #ColorYellow#][!UpdateMeter MaxValMeter][!Redraw]IfCondition3=((#GraphUpperBound# >= #LowValueAlert#) && (#GraphUpperBound# <= #HighValueAlert#))IfTrueAction3=[!SetOption MaxValMeter FontColor #ColorWhite#][!UpdateMeter MaxValMeter][!Redraw]ToolTipText="#GraphVal0# --> #GraphVal1##CRLF##GraphVal2# --> #GraphVal3##CRLF##GraphVal4# --> #GraphVal5#"DynamicVariables=1
The Result:
Color remains #ColorText# in all situations (double checked condition values in the log and the IfConditions should definitely be triggering)
Things I've already tried:
Adding !UpdateMeter and !Redraw (as is still included because I believe it's standard practice for this?)
Surrounding values in quotations (e.g. "FontColor" "#ColorRed#", etc.) -- Color values include no spaces
Using !SetValue instead of !SetOption
Workaround:
Code:
[MeasureGetMidVal]Measure=CalcFormula=((#GraphUpperBound#+#GraphLowerBound#)/2)IfCondition=(MeasureGetMidVal < #LowValueAlert#)IfTrueAction=[!SetOption MidValMeter FontColor #ColorRed#]IfCondition2=(MeasureGetMidVal > #HighValueAlert#)IfTrueAction2=[!SetOption MidValMeter FontColor #ColorYellow#]IfCondition3=((MeasureGetMidVal >= #LowValueAlert#) && (MeasureGetMidVal <= #HighValueAlert#))IfTrueAction3=[!SetOption MidValMeter FontColor #ColorWhite#]DynamicVariables=1[MidValMeter]Meter=StringX=(#pad.X#-(#pad.X#/2))Y=(((#pad.Y#*2)+#graph.height#-10)/2)Text="[&MeasureGetMidVal]"FontSize=12FontWeight=500Hidden=#hide.nums#DynamicVariables=1
Version / System Info:
Rainmeter 4.5.20.3803 (64-bit)
Language: English (1033)
Build time: 2024-08-27 15:17:14
Windows 10 Home 22H2 (build 19045.4894) 64-bit - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\myname\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\myname\AppData\Roaming\Rainmeter\
IniFile: C:\Users\myname\AppData\Roaming\Rainmeter\Rainmeter.ini
Statistics: Posted by Ven — Yesterday, 11:11 pm — Replies 5 — Views 72