It is currently March 28th, 2024, 1:13 pm

Used Drive Measure Not right....

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
Bobski2000
Posts: 2
Joined: October 16th, 2020, 12:47 pm

Used Drive Measure Not right....

Post by Bobski2000 »

Hi everyone,
Im very new to Rainmeter and thought id have a go at something basic like adding a drive (Drive x) from my NAS drive. This is a mapped drive. But for some reason its "Used" drive space looks wrong, /%2B instead of whats left ?
Can you help please?
Ive rechecked it a few times and all looks good to me.
I've included a picture and the code for you to look and check please?
Disks.jpg

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Disk
Author=poiru
Information=Displays disk usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=E:
disk3=X:

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureTotalDisk1]
; This measure returns the total disk space
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120

[measureUsedDisk1]
; Returns inverted value of free disk space (i.e. used disk space)
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120

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

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


[measureTotalDisk3]
; This measure returns the total disk space
Measure=FreeDiskSpace
Drive=#disk3#
Total=1
UpdateDivider=120

[measureUsedDisk3]
; Returns inverted value of free disk space (i.e. used disk space)
Measure=FreeDiskSpace
Drive=#disk3#
InvertMeasure=1
UpdateDivider=120

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Disks
; Even though the text is set to Disks, Rainmeter will display
; it as DISKS, because styleTitle contains StringCase=Upper.

[meterLabelDisk1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=#disk1#\

[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1B/%2B used
; %1 stands for the value of MeasureName (measureUsedDisk1 in this case).
; %2 stands for the value of MeasureName2.
NumOfDecimals=1
AutoScale=1
; Because disk measures return the free/used space in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.
LeftMouseUpAction=["#disk1#\"]
; Open #disk1# on click

[meterBarDisk1]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=10
Y=52
W=190
H=1

[meterLabelDisk2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=#disk2#\
LeftMouseUpAction=["#disk2#\"]

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

[meterBarDisk2]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=10
Y=72
W=190
H=1


[meterLabelDisk3]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=#disk3#\
LeftMouseUpAction=["#disk3#\"]

[meterValueDisk3]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk3
MeasureName3=measureTotalDisk3
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1

[meterBarDisk3]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk3
X=10
Y=92
W=190
H=1
Thank you
Bobski2000
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Used Drive Measure Not right....

Post by ikarus1969 »

Hi!

instead of MeasureName3=measureTotalDisk3 you have to use MeasureName2=measureTotalDisk3 because there are only 2 measures on this meter (MeasureName2 instead of MeasureName3)
User avatar
Bobski2000
Posts: 2
Joined: October 16th, 2020, 12:47 pm

Re: Used Drive Measure Not right....

Post by Bobski2000 »

Wow thank you,
Totaly missed that.
So new to all this.
Thanks Again ikarus1969

Regards
Bobski2000
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Used Drive Measure Not right....

Post by ikarus1969 »

Bobski2000 wrote: October 17th, 2020, 4:31 pm So new to all this.
Thanks Again ikarus1969

Regards
Bobski2000
Don't mind - we've all started like that. Just ask if new problems should arise.
Post Reply