Page 1 of 1

Show & Hide Meters?

Posted: April 3rd, 2010, 7:09 pm
by ForceX
I cannot seam to get !RainmeterShowMeter or !RainmeterHideMeter to work. Any ideas? Can "IfAboveValue=" not use MeterName to pull it's information from??

;===========================================
;Drive 1 Display
;===========================================

[Mse_DriveAccess]
Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject=LogicalDisk
PerfMonCounter="Disk Bytes/sec"
PerfMonInstance="#drive1#"

[Mse_DriveFree]
Measure=FreeDiskSpace
Drive=#drive1#

[Mse_DriveUsed]
Measure=FreeDiskSpace
Drive=#drive1#
InvertMeasure=1

[Mse_DriveSize]
Measure=FreeDiskSpace
Drive=#drive1#
Total=1

[Mse_Drive%]
Meter=STRING
MeasureName=Mse_driveUsed
FontColor=242, 238, 202, 255
Percentual=1

;-----------------------------------------------------------
;Drive 1 Name Text
;-----------------------------------------------------------

[Drive%]
Meter=STRING
X=5
Y=640
FontColor=#font1#
FontSize=8
FontFace=#Font1Name#
AntiAlias=1
Text="Drive #drive1#"

;-----------------------------------------------------------
;Drive 1 Bar
;-----------------------------------------------------------

[Drive1Back]
Meter=IMAGE
X=60
Y=3r
W=185
H=6
SolidColor=#color2#


[Drive%.Norm]
MeasureName=Mse_Drive%
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Green][!RainmeterHideMeter Rl_DriveUsed_Red]

[Drive%.Low]
MeasureName=Mse_Drive%
IfAboveValue=60
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Red][!RainmeterHideMeter Rl_DriveUsed_Green]


[Rl_DriveUsed_Red]
Meter=Bar
MeasureName=Mse_DriveUsed
X=0r
Y=0r
W=150
H=6
BarColor=#color12#
BarOrientation=HORIZONTAL
hidden=1

[Rl_DriveUsed_Green]
Meter=Bar
MeasureName=Mse_DriveUsed
X=0r
Y=0r
W=150
H=6
BarColor=#color11#
BarOrientation=HORIZONTAL
hidden=1

Re: Show & Hide Meters?

Posted: April 3rd, 2010, 7:18 pm
by jsmorley
Trouble is, those are not measures, as you have not said they are... So they are completely ignored.

[Drive%.Norm]
MeasureName=Mse_Drive%
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Green][!RainmeterHideMeter Rl_DriveUsed_Red]

[Drive%.Low]
MeasureName=Mse_Drive%
IfAboveValue=60
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Red][!RainmeterHideMeter Rl_DriveUsed_Green]


************************************

[Drive%.OverUnder]
Measure=Calc
Formula=Mse_Drive%
IfBelowValue=60
IfBelowAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Green][!RainmeterHideMeter Rl_DriveUsed_Red]
IfAboveValue=59
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Red][!RainmeterHideMeter Rl_DriveUsed_Green]

That might work better for you.

Re: Show & Hide Meters?

Posted: April 3rd, 2010, 7:56 pm
by ForceX
HAHA i knew i had to be missing something :))

Thanks for the fast reply.

Re: Show & Hide Meters?

Posted: April 3rd, 2010, 8:08 pm
by ForceX
This is strange... "The IfAboveAction=" is not working.. I've isolated it as shown below and both Rl_DriveUsed_Green & Rl_DriveUsed_Red bars remain hidden. I've even moved the value around to try to provoke it to work, but so far nothing has.


[Drive%.OverUnder]
Measure=Calc
Formula=Mse_Drive%
;IfBelowValue=60
;IfBelowAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Green][!RainmeterHideMeter Rl_DriveUsed_Red]
IfAboveValue=59
IfAboveAction=!Execute [!RainmeterShowMeter Rl_DriveUsed_Red][!RainmeterHideMeter Rl_DriveUsed_Green]

Re: Show & Hide Meters?

Posted: April 3rd, 2010, 8:37 pm
by ForceX
I found the problem. My Mse_Drive% is returning a whole number such as 894562 and not the % of that number..

Re: Show & Hide Meters?

Posted: April 3rd, 2010, 10:24 pm
by jsmorley
ForceX wrote:I found the problem. My Mse_Drive% is returning a whole number such as 894562 and not the % of that number..
Good. The "About" dialog in the context menu for Rainmeter is the most staggeringly useful "About" dialog in any application I have ever seen.

Re: Show & Hide Meters?

Posted: April 4th, 2010, 12:46 am
by ForceX
WOW!! I never even looked at the about menu before. Your right.. The amount of information contained whit in it is amazing. I'm glad you mentioned that.

Re: Show & Hide Meters?

Posted: April 22nd, 2010, 5:19 am
by OTD
Hey I have a similar problem! I'm making a weather forecast skin that changes between "today's forecast will be ..." and "tonight's forecast will be ..." when it hits 5AM and 3PM respectively. Thus, one has to be hidden, and the other shown, at all times (e.g. at 1PM it will be "today's forecast," and at 4PM that display will be hidden and replaced with "tonight's forecast"). Needless to say, I'm not working the code quite well enough =P

PART OF CODE:

Code: Select all

[MeasureTimeDay]
MeasureName=Time
Format=%H
IfEqualValue=05
IfEqualAction=!Execute [!RainmeterShowMeter TodayWeather] [!RainmeterHideMeter TonightWeather]

[MeasureTimeNight]
Measure=Time
Format=%H
IfEqualValue=15
IfEqualAction=!Execute [!RainmeterShowMeter TonightWeather] [!RainmeterHideMeter TodayWeather]

MeasureName=TodayWeatherTemp
Hidden=1
Meter=String
Prefix="Today, it will be around "
Postfix=" degrees in Montreal."
W=500
H=20
FontColor=180, 180, 180, 200
FontSize=15
FontFace=Key's comic font 1
StringAlign=Left
AntiAlias=1

[TonightWeather]

MeasureName=TonightWeatherTemp
Hidden=1
Meter=String
Prefix="Tonight, it will be around "
Postfix=" degrees in Montreal."
W=500
H=20
FontColor=180, 180, 180, 200
FontSize=15
FontFace=Key's comic font 1
StringAlign=Left
AntiAlias=1
Please shed some light on this matter =]