It is currently April 18th, 2024, 1:32 pm

Resolved - !HideMeter not seeming to work with HWInfo

Get help with creating, editing & fixing problems with skins
CMDR_Evolution
Posts: 16
Joined: October 30th, 2020, 6:25 pm

Resolved - !HideMeter not seeming to work with HWInfo

Post by CMDR_Evolution »

Greetings,

Sorry to ask about the following issue I'm having but I've tried to find the answer / workaround but am at a loss so far...

I have a skin which reads HWInfo sensors and shows my drive usages. What I'm trying to do, is to hide the read/write data amounts when it is below 0.0.

Just to mention - HWInfo usually sends the data through with 3 decimal places, but I've changed it to only pass 1 decimal place.

This is the best I've come up with but no joy as of yet. Can anyone help please?

Code: Select all


[MeasureReadDisk1]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWiNFO64\VSB
RegValue=ValueRaw82

[MeasureDisk1Write]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=SOFTWARE\HWiNFO64\VSB
RegValue=ValueRaw83

--------------------------------------------------

[MeasureReadDisk1_hide]
Measure=Calc
Formula=MeasureReadDisk1
IfBelowValue=0.0
IfBelowAction=[!HideMeter meterReadDisk1][!UpdateMeter *][!Redraw]
IfEqualValue=0.0
IfEqualAction=[!ShowMeter meterReadDisk1][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeasureWriteDisk1_hide]
Measure=Calc
Formula=MeasureWriteDisk3
IfBelowValue=0.0
IfBelowAction=[!HideMeter meterWriteDisk1][!UpdateMeter *][!Redraw]
IfEqualValue=0.0
IfEqualAction=[!ShowMeter meterWriteDisk1][!UpdateMeter *][!Redraw]
DynamicVariables=1

--------------------------------------------------

[meterReadDisk1]
Meter=String
StringAlign=Right
MeasureName=MeasureReadDisk1
X=205
Y=0r
H=16
Postfix="MB"
FontFace=#FontName#
FontColor=000,175,000,240
FontSize=#FontSize#
StringStyle=Bold
AntiAlias=1

[meterWriteDisk1]
Meter=String
StringAlign=Right
MeasureName=MeasureWriteDisk1
X=480
Y=0r
H=16
Postfix="MB"
FontFace=#FontName#
FontColor=000,175,000,240
FontSize=#FontSize#
StringStyle=Bold
AntiAlias=1

Last edited by CMDR_Evolution on December 15th, 2022, 6:58 pm, edited 1 time in total.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2603
Joined: March 23rd, 2015, 5:26 pm

Re: !HideMeter not seeming to work

Post by SilverAzide »

CMDR_Evolution wrote: December 15th, 2022, 4:21 pm Greetings,

Sorry to ask about the following issue I'm having but I've tried to find the answer / workaround but am at a loss so far...

I have a skin which reads HWInfo sensors and shows my drive usages. What I'm trying to do, is to hide the read/write data amounts when it is below 0.0.

Just to mention - HWInfo usually sends the data through with 3 decimal places, but I've changed it to only pass 1 decimal place.

This is the best I've come up with but no joy as of yet. Can anyone help please?
Yes... the problem is that the condition IfBelowValue=0.0 will never be true, thus the meters will never be hidden. The HWiNFO measures will never return negative values. They can return blank values (which end up as errors in the log and nothing will happen), but never negative.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !HideMeter not seeming to work

Post by balala »

SilverAzide wrote: December 15th, 2022, 5:39 pm The HWiNFO measures will never return negative values. They can return blank values (which end up as errors in the log and nothing will happen), but never negative.
In this case, I assume a (regular expression) substitution could help. I thought to something like this:

Code: Select all

[MeasureReadDisk1]
...
RegExpSubstitute=1
Substitute="^$":"-1"
In such a case the Formula option of the related [MeasureReadDisk1_hide] measure should also be rewritten to Formula=[MeasureReadDisk1], to let the [MeasureReadDisk1_hide] measure to get the substituted value. This option in this form is valid, because the measure has set the dynamic variables.
CMDR_Evolution
Posts: 16
Joined: October 30th, 2020, 6:25 pm

Re: !HideMeter not seeming to work

Post by CMDR_Evolution »

SilverAzide wrote: December 15th, 2022, 5:39 pm Yes... the problem is that the condition IfBelowValue=0.0 will never be true, thus the meters will never be hidden. The HWiNFO measures will never return negative values. They can return blank values (which end up as errors in the log and nothing will happen), but never negative.
balala wrote: December 15th, 2022, 6:45 pm In this case, I assume a (regular expression) substitution could help. I thought to something like this:

Code: Select all

[MeasureReadDisk1]
...
RegExpSubstitute=1
Substitute="^$":"-1"
In such a case the Formula option of the related [MeasureReadDisk1_hide] measure should also be rewritten to Formula=[MeasureReadDisk1], to let the [MeasureReadDisk1_hide] measure to get the substituted value. This option in this form is valid, because the measure has set the dynamic variables.
Thank you both very much for your replies and insight. After seeing SilverAzide's reply a short while ago, I decided to switch the if conditions to:

Code: Select all

IfBelowValue=0.1
and

Code: Select all

IfAboveValue=0.09
, which has worked perfectly!

Thanks again :D
User avatar
SilverAzide
Rainmeter Sage
Posts: 2603
Joined: March 23rd, 2015, 5:26 pm

Re: !HideMeter not seeming to work

Post by SilverAzide »

balala wrote: December 15th, 2022, 6:45 pm In this case, I assume a (regular expression) substitution could help. I thought to something like this:

Code: Select all

[MeasureReadDisk1]
...
RegExpSubstitute=1
Substitute="^$":"-1"
In such a case the Formula option of the related [MeasureReadDisk1_hide] measure should also be rewritten to Formula=[MeasureReadDisk1], to let the [MeasureReadDisk1_hide] measure to get the substituted value. This option in this form is valid, because the measure has set the dynamic variables.
This is a good idea for any Registry (or WebParser) measure where it is reading a "numeric string" and there is a possibility of an empty or blank value, and where "-1" won't be a valid value in normal cases.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !HideMeter not seeming to work

Post by balala »

SilverAzide wrote: December 15th, 2022, 8:15 pm This is a good idea for any Registry (or WebParser) measure where it is reading a "numeric string" and there is a possibility of an empty or blank value, and where "-1" won't be a valid value in normal cases.
Like in this case, I assume. Glad if you think it's a good idea.