Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1056

Bugs & Feature Suggestions • Re: A question about "Registry Measure"

$
0
0
Sorry for reviving this old post. Maybe 3 years ago there wasn't some trick to work around this.

I'm currently facing the exact same problem. I want to deactivate measures based on their string value. These measures are HWiNFO registry measures.

At first I thought I could do something like IfMatch=^0$ but noup, it doesn't work. Then I thought well, I use substitute to replace that 0 for some string and then use ifMatch with that string but noup, it doesn't work. If I use something like IfMatch=0 then it would disable even if the string is "0 RPM" which is not the desired behavior.

I'm facing a big wall right now. The only thing that works is using ifcondition, and it works only because the string value becomes a "flat" number only when there's no sensor active, but that gives me an ifcondition error on the log when it's false.

I'm looking for ideas on how to address this. The idea is that the measures are disabled until the user sets the index values through a settings panel, but if the use later on "deletes" that index value the measure would disable until a new index value is set. When I say "delete" what happens is that the index value is replaced by the word "INDEX", which is an invalid index value, which turns the string value of the measure into a 0. The only time these measures are 0 is when there's no valid index value. This is to avoid the measure from disabling with values like 0 V, 0 W, 0 RPM.

Any idea on how to solve this issue?

Edit: Lol, right after writing this I realized I can use the variables I use to set the index values to deactivate them, changing those variables to "-1" instead of "INDEX" allows me to use ifconditions to deactivate them using only one measure:

Code:

[SensorDisabler]Group=ListSensorsMeasure=CalcIfCondition=([#Sensor1Ix] = -1)IfTrueAction=[!DisableMeasure mSensor1]IfFalseAction=[!EnableMeasure mSensor1]IfCondition2=([#Sensor2Ix] = -1)IfTrueAction2=[!DisableMeasure mSensor2]IfFalseAction2=[!EnableMeasure mSensor2]IfCondition3=([#Sensor3Ix] = -1)IfTrueAction3=[!DisableMeasure mSensor3]IfFalseAction3=[!EnableMeasure mSensor3]IfCondition4=([#Sensor4Ix] = -1)IfTrueAction4=[!DisableMeasure mSensor4]IfFalseAction4=[!EnableMeasure mSensor4]IfCondition5=([#Sensor5Ix] = -1)IfTrueAction5=[!DisableMeasure mSensor5]IfFalseAction5=[!EnableMeasure mSensor5]IfCondition6=([#Sensor6Ix] = -1)IfTrueAction6=[!DisableMeasure mSensor6]IfFalseAction6=[!EnableMeasure mSensor6]DynamicVariables=1
Hope this solution serves anyone else having this problem.

Statistics: Posted by RicardoTM — Yesterday, 8:14 pm



Viewing all articles
Browse latest Browse all 1056

Trending Articles