It is currently December 8th, 2021, 7:18 pm

Show & Hide Meters?

Help with creating, editing & fixing problems with skins
User avatar
ForceX
Posts: 100
Joined: January 16th, 2010, 10:32 pm

Show & Hide Meters?

Post 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
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Show & Hide Meters?

Post 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.
User avatar
ForceX
Posts: 100
Joined: January 16th, 2010, 10:32 pm

Re: Show & Hide Meters?

Post by ForceX »

HAHA i knew i had to be missing something :))

Thanks for the fast reply.
User avatar
ForceX
Posts: 100
Joined: January 16th, 2010, 10:32 pm

Re: Show & Hide Meters?

Post 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]
User avatar
ForceX
Posts: 100
Joined: January 16th, 2010, 10:32 pm

Re: Show & Hide Meters?

Post by ForceX »

I found the problem. My Mse_Drive% is returning a whole number such as 894562 and not the % of that number..
User avatar
jsmorley
Developer
Posts: 22421
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Show & Hide Meters?

Post 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.
User avatar
ForceX
Posts: 100
Joined: January 16th, 2010, 10:32 pm

Re: Show & Hide Meters?

Post 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.
OTD
Posts: 1
Joined: March 29th, 2010, 11:31 pm

Re: Show & Hide Meters?

Post 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 =]