If there's a bug, I suspect it's in my code or logic! Here are what I think are the relevant bits (I actually have 12 "MeasureActive" sections, but they are all the same, just for different skins)....
Code: Select all
[Rainmeter]
Update=-1
[Variables]
Transp=160
WANum=0
CPUNum=1
[MeasureActive1]
Measure=Plugin
Plugin=ConfigActive
ConfigName=Sensors\AudioPlayer
IfCondition=#CURRENTSECTION# = 1
IfTrueAction=[!SetVariable WANum "1"]
IfFalseAction=[!SetVariable WANum "0"]
[MeasureActive2]
Measure=Plugin
Plugin=ConfigActive
ConfigName=Sensors\CPU and RAM
IfCondition=#CURRENTSECTION# = 1
IfTrueAction=[!SetVariable CPUNum "1"]
IfFalseAction=[!SetVariable CPUNum "0"]
[Shp_Player]
Meter=Shape
Shape=Rectangle 0,1,121,20 | Fill Color 0,0,0,#Transp# | StrokeWidth 1 | Stroke Color 128,128,128,(#Transp# + 32)
LeftMouseUpAction=[!CommandMeasure mPlayer TogglePlayer][!ToggleConfig "Sensors\AudioPlayer" "Player.ini"][!UpdateMeasure "MeasureActive1"][!UpdateMeter "Btn_Player"][!ReDraw]
[Btn_Player]
Meter=Image
ImageName=#@#Btn_#WANum#.png
X=3
Y=1
DynamicVariables=1
[Shp_CPU]
Meter=Shape
Shape=Rectangle 0,21,60,20 | Fill Color 0,0,0,#Transp# | StrokeWidth 1 | Stroke Color 128,128,128,#Transp# + 32
LeftMouseUpAction=[!ToggleConfig "Sensors\CPU and RAM" "CPU and RAM.ini"][!UpdateMeasure "MeasureActive2"][!UpdateMeter "Btn_CPU"][!ReDraw]
[Btn_CPU]
Meter=Image
ImageName=#@#Btn_#CPUNum#.png
X=3
Y=22
DynamicVariables=1
I've been using this for more than a month now with no issues. Two days ago, I used Game Mode for the first time. Pretty cool! But when I reactivate Rainmeter, all the button graphics are "off" (in the Log all the MeasureActive values are -1, and therefore all the variables tracking the measures are 0). Refreshing the skin turns all the buttons to the correct state.
So the problem seems to be that upon "awakening" from Game Mode, ConfigActive is returning -1 even if the specified ConfigName skin is active. Is it a timing thing (is ConfigActive too quick, and the other skins haven't finished loading yet)?
I'm using Rainmeter 4.4.0.3399 and ConfigActive 2.2.1.0 in 64-bit Windows 7.
Thanks!
P.S. Just as a kludge, I tried using OnRefreshAction=[!Update], but that didn't work.