1) Can I use nested ternary statements?
2) Would such a statement for rainmeter look like:
Code: Select all
[Variables]
Percent=MeasureCurrentColor
Color=(#Percent# < 10 ? "FF0000" : (#Percent# < 20 ? "FF8000" : "008800"))
Code: Select all
[MeasureCurrentColor]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS
Substitute="0":"FF8000","1":"008800","2":"FF0000","3":"FF8000","4":"008800"
UpdateDivider=60
[Robe]
Meter=Bar
BarColor=MeasureCurrentColor
Creator info wasn't changed, one similar to the original is here: http://browse.deviantart.com/?q=battery+rainmeter#/d4yl3n7
As for the output, my issue was that it is producing the default color (255, 255, 255, 255 in rgb). At that point I knew I had two problems.
1) It should have at least produced a colored output, regardless of what it was, if it had supported hex colors.
2) Because the plugin I'm currently using doesn't have proper values for finding high/low/critical status of the battery, I considered doing it by percents.
Code: Select all
[MeasureCurrentColor]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=PERCENT
Substitute="0":"FF8000","1":"008800","2":"FF0000","3":"FF8000","4":"008800"
UpdateDivider=60
[Robe]
Meter=Bar
BarColor=MeasureCurrentColor