It is currently April 26th, 2024, 4:39 pm

DiskSpace Measure Problem

Get help with creating, editing & fixing problems with skins
User avatar
Slim08
Posts: 23
Joined: October 8th, 2018, 4:38 pm

Re: DiskSpace Measure Problem

Post by Slim08 »

sorry :Whistle - it took a while but now I get it - thanks jsmorley :welcome:
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: DiskSpace Measure Problem

Post by jsmorley »

Slim08 wrote: November 11th, 2018, 2:12 pm sorry :Whistle - it took a while but now I get it - thanks jsmorley :welcome:
Glad to help. As I said, I'm not in love with this approach, as it requires separate / duplicate measures to get the percentage as a value, like 30%, to use as the numeric value for the Bar meter and a string value for the String meter, and another to do the Substitute to create the color codes, but it will work.
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: DiskSpace Measure Problem

Post by jsmorley »

I'd be tempted to do something like:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureTotalDiskSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1
UpdateDivider=5

[MeasureFreeDiskSpace]
Measure=FreeDiskSpace
Drive=C:
UpdateDivider=5

[MeasurePercentUsed]
Measure=Calc
Formula=(MeasureTotalDiskSpace - MeasureFreeDiskSpace) / MeasureTotalDiskSpace

[MeasurePercentFree]
Measure=Calc
Formula=(MeasureFreeDiskSpace / MeasureTotalDiskSpace) * 100
MinValue=0
MaxValue=100
IfCondition=MeasurePercentFree < 80
IfTrueAction=[!SetOption MeterPercentFree FontColor "255,0,0,255"][!SetOption MeterUsedBar BarColor "255,0,0,255"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterPercentFree FontColor "255,255,255,255"][[!SetOption MeterUsedBar BarColor "255,255,255,255"]!UpdateMeter *][!Redraw]

[MeterPercentFree]
Meter=String
MeasureName=MeasurePercentFree
FontSize=20
FontWeight=700
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1% Free Disk Space

[MeterUsedBar]
Meter=Bar
MeasureName=MeasurePercentUsed
Y=5R
W=285
H=3
BarColor=255,255,255,255
BarOrientation=Horizontal
SolidColor=47,47,47,255

1.png
You do not have the required permissions to view the files attached to this post.