Rainmeter code help

Associate
Joined
20 May 2006
Posts
1,068
Hi guys,

Just wondering if someone could give me a hand with the following code.

It's originally created by 'Nova' - and I've just been editing/adding a bit of stuff to it so I can have a new bar meter and text text for the total hard drive space, and total free space, across all HDD's.

I've got the text working fine, it calculates and displays the total and free space of all drives, but the 'bar meter' is constantly showing as 'full/i.e. no space free' but there is 700gig free.

Code:

Code:
D1=C:
D2=X:
D3=M:
D4=F:
Comb=[measureTotalDiskComb]

; ----------------------------------

[combmeasureUsedDisk1]
Measure=FreeDiskSpace
Drive=#D1#
UpdateDivider=120

[combmeasureUsedDisk2]
Measure=FreeDiskSpace
Drive=#D2#
UpdateDivider=120

[combmeasureUsedDisk3]
Measure=FreeDiskSpace
Drive=#D3#
UpdateDivider=120

[combmeasureUsedDisk4]
Measure=FreeDiskSpace
Drive=#D4#
UpdateDivider=120

; ----------------------------------

[measureTotalDisk1]
Measure=FreeDiskSpace
Drive=#D1#
Total=1
UpdateDivider=120

[measureUsedDisk1]
Measure=FreeDiskSpace
Drive=#D1#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#D2#
Total=1
UpdateDivider=120

[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#D2#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk3]
Measure=FreeDiskSpace
Drive=#D3#
Total=1
UpdateDivider=120

[measureUsedDisk3]
Measure=FreeDiskSpace
Drive=#D3#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk4]
Measure=FreeDiskSpace
Drive=#D4#
Total=1
UpdateDivider=120

[measureUsedDisk4]
Measure=FreeDiskSpace
Drive=#D4#
InvertMeasure=1
UpdateDivider=120

[measureTotalDiskComb]
Measure=Calc
Formula=([measureTotalDisk1] + [measureTotalDisk2] + [measureTotalDisk3] + [measureTotalDisk4])
DynamicVariables=1
UpdateDivider=120

[measureUsedDiskComb]
Measure=Calc
Formula=([combmeasureUsedDisk1] + [combmeasureUsedDisk2] + [combmeasureUsedDisk3] + [combmeasureUsedDisk4])
DynamicVariables=1
UpdateDivider=120

; ----------------------------------

[meterLabelDisk1]
Meter=STRING
MeterStyle=styleLeftText
X=30
Y=42
W=290
H=14
FontColor=#Font Color#
Text="#D1#\"

[meterValueDisk1]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=290
Y=0r
W=190
H=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=!Execute ["#D1#\"]

[meterBarDisk1]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=30
Y=60
W=290
H=3

[meterLabelDisk2]
Meter=STRING
MeterStyle=styleLeftText
X=30
Y=72
W=290
H=14
FontColor=#Font Color#
Text="#D2#\"
LeftMouseUpAction=!Execute ["#D2#\"]

[meterValueDisk2]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=290
Y=0r
W=290
H=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1

[meterBarDisk2]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=30
Y=90
W=290
H=3

[meterLabelDisk3]
Meter=STRING
MeterStyle=styleLeftText
X=30
Y=102
W=290
H=14
FontColor=#Font Color#
Text="#D3#\"

[meterValueDisk3]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDisk3
MeasureName2=measureTotalDisk3
X=290
Y=0r
W=390
H=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=!Execute ["#D3#\"]

[meterBarDisk3]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk3
X=30
Y=120
W=290
H=3

[meterLabelDisk4]
Meter=STRING
MeterStyle=styleLeftText
X=30
Y=132
W=290
H=14
FontColor=#Font Color#
Text="#D4#\"

[meterValueDisk4]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDisk4
MeasureName2=measureTotalDisk4
X=290
Y=0r
W=390
H=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=!Execute ["#D4#\"]

[meterBarDisk4]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk4
X=30
Y=150
W=290
H=3

;----------------------------------

[meterLabelDiskComb]
Meter=STRING
MeterStyle=styleLeftText
X=30
Y=162
W=290
H=14
FontColor=#Font Color#
Text="Total Combine:"

[meterLabelDiskCombRight]
Meter=STRING
MeterStyle=styleRightText
X=240
Y=162
W=290
H=14
FontColor=Green
Text="Free:"

[meterValueDiskCombUsed]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDiskComb
MeasureName2=measureTotalDiskComb
X=135
Y=0r
W=190
H=14
Text="%2B"
NumOfDecimals=1
AutoScale=1

[meterValueDiskCombFree]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedDiskComb
MeasureName2=measureTotalDiskComb
X=290
Y=0r
W=190
H=14
Text="%1B"
NumOfDecimals=1
AutoScale=1

[meterBarDiskComb]
Meter=BAR
BarColor=ffcf76
SolidColor=#ff4828
MeasureName=measureUsedDiskComb
X=30
Y=180
W=290
H=3
 
Haven't looked at rainmeter yet, but at first glance, is it anything o do with the combmeasureUsedDisk attribute? All of the others use camel case so would it be combMeasureUsedDisk?
 
Back
Top Bottom