I was trying to make a widget depening on the battery level.
In my vars.inc file I have the saved colors named RED, ORANGE etc.
Picking the colors from file are working, I tested out that with mouseover function
Code: Select all
MouseOverAction=[!SetOption DOTS1 imagetint #RED#]
An image has to appear when it is on the battery and disappear when plugged in (That's working).
What's more I need it to change the color when the battery level is below some level e.g. 50% (That's not working)
Horizontal 5 dots
The battery percentage and plugged in status are calculated correctly imo as shown in the picture.
There's my code:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
@Include1=#ROOTCONFIGPATH#\Resources\vars.inc
[MeasurePercent]
Measure=Plugin
PlugIn=PowerPlugin
PowerState=PERCENT
[MeasureACLine]
Measure=Plugin
PlugIn=PowerPlugin
PowerState=ACLINE
Substitute="0","1"
IfCondition= (#CURRENTSECTION#=1)
IfTrueAction=[!HideMeter DOTS1]
IfFalseAction=[!ShowMeter DOTS1]
[DOTS1]
Meter=image
x=100
y=0
imagename=#currentpath#\resources\images\1BatteryON.png
IfCondition=(MeasurePercent>50)
IfTrueAction=[!SetOption DOTS1 imagetint #YELLOW#]
IfFalseAction=[!SetOption DOTS1 imagetint #RED#]
I tried this way and stucked
I am looking forward to your answers