It is currently April 24th, 2024, 8:35 am

Newby -having problems with USB disk measures

Get help with creating, editing & fixing problems with skins
ozzman2017
Posts: 3
Joined: November 27th, 2017, 2:42 am

Newby -having problems with USB disk measures

Post by ozzman2017 »

Hi guys, I've spent about 2 hours trying to figure out how to display disk space usage on my usb drive, but I cannot figure this out. The measure are always 0.0gb/0.0 GB used.

I'm using: Rainmeter 4.1.0 r2989 64bit with windows 10 pro

The measures section looks like:

Code: Select all

; ----------------------------------
; 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

; ----------------------------------
; 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
My question is, is rainmeter able to measure usage on an usb drive? and second, anyone see any issues with the above?
Last edited by fonpaolo on November 27th, 2017, 8:15 am, edited 1 time in total.
Reason: Please use the [Code] tags to display your code.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Newby -having problems with USB disk measures

Post by mak_kawa »

Is your USB drive #disk2#? If so, insert IgnoreRemovable=0 to measures [measureTotalDisk2] and [measureUsedDisk2], maybe.