It is currently May 18th, 2024, 5:25 am

Cant figure this one out.

Get help with creating, editing & fixing problems with skins
John877
Posts: 4
Joined: October 12th, 2012, 4:37 am

Cant figure this one out.

Post by John877 »

Im new to Rainmeter and trying to figure out a clean drive info meter. I took the code on the FreeDiskSpace(beta) page under help and it works fine for C but cant seem to get it to work for D E and F. I have labelled the measures and meters differently to avoid conflictions as well.

Heres what it looks like right now:
Image

Heres the skin code:

Code: Select all

[Rainmeter]
Update=500
BackgroundMode=2
SolidColor=0,0,0,100
[MeasureCDiskLabel]
Measure=FreeDiskSpace
Drive=C:
Label=1
UpdateDivider=2
[MeasureCFreeDiskSpace]
Measure=FreeDiskSpace
Drive=C:
UpdateDivider=2
[MeasureCUsedDiskSpace]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1
UpdateDivider=2
[MeasureCTotalDiskSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1
UpdateDivider=2
[MeterCDriveInfo]
Meter=String
MeasureName=MeasureCDiskLabel
MeasureName2=MeasureCFreeDiskSpace
MeasureName3=MeasureCUsedDiskSpace
MeasureName4=MeasureCTotalDiskSpace
X=0
Y=0
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="C:\%1 [Free: %2B] [Used: %3B] [Total: %4B]"

[MeasureDDiskLabel]
Measure=FreeDiskSpace
Drive=D:
Label=1
UpdateDivider=2
[MeasureDFreeDiskSpace]
Measure=FreeDiskSpace
Drive=D:
UpdateDivider=2
[MeasureDUsedDiskSpace]
Measure=FreeDiskSpace
Drive=D:
InvertMeasure=1
UpdateDivider=2
[MeasureDTotalDiskSpace]
Measure=FreeDiskSpace
Drive=D:
Total=1
UpdateDivider=2
[MeterDDriveInfo]
Meter=String
MeasureName5=MeasureDDiskLabel
MeasureName6=MeasureDFreeDiskSpace
MeasureName7=MeasureDUsedDiskSpace
MeasureName8=MeasureDTotalDiskSpace
X=0
Y=20
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="D:\%5 [Free: %6B] [Used: %7B] [Total: %8B]"

[MeasureEDiskLabel]
Measure=FreeDiskSpace
Drive=E:
Label=1
UpdateDivider=2
[MeasureEFreeDiskSpace]
Measure=FreeDiskSpace
Drive=E:
UpdateDivider=2
[MeasureEUsedDiskSpace]
Measure=FreeDiskSpace
Drive=E:
InvertMeasure=1
UpdateDivider=2
[MeasureETotalDiskSpace]
Measure=FreeDiskSpace
Drive=E:
Total=1
UpdateDivider=2
[MeterEDriveInfo]
Meter=String
MeasureName9=MeasureEDiskLabel
MeasureName10=MeasureEFreeDiskSpace
MeasureName11=MeasureEUsedDiskSpace
MeasureName12=MeasureETotalDiskSpace
X=0
Y=40
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="E:\%9 [Free: %10B] [Used: %11B] [Total: %12B]"

[MeasureFDiskLabel]
Measure=FreeDiskSpace
Drive=F:
Label=1
UpdateDivider=2
[MeasureFFreeDiskSpace]
Measure=FreeDiskSpace
Drive=F:
UpdateDivider=2
[MeasureFUsedDiskSpace]
Measure=FreeDiskSpace
Drive=F:
InvertMeasure=1
UpdateDivider=2
[MeasureFTotalDiskSpace]
Measure=FreeDiskSpace
Drive=F:
Total=1
UpdateDivider=2
[MeterFDriveInfo]
Meter=String
MeasureName13=MeasureFDiskLabel
MeasureName14=MeasureFFreeDiskSpace
MeasureName15=MeasureFUsedDiskSpace
MeasureName16=MeasureFTotalDiskSpace
X=0
Y=60
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="F:\%13 [Free: %14B] [Used: %15B] [Total: %16B]"
.
User avatar
Brian
Developer
Posts: 2695
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Cant figure this one out.

Post by Brian »

You are really close.

MeasureName is per meter. So if you start at 5 (ie. MeasureName5) with out 4, 3, ..., your meter will not be bound to any measure. I hope that makes sense.

Also, you have an Update=500, and UpdateDivider=2 on all your measures. Although there is nothing wrong with this, simply use a Update=1000.

Here you go:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,100

[MeasureCDiskLabel]
Measure=FreeDiskSpace
Drive=C:
Label=1

[MeasureCFreeDiskSpace]
Measure=FreeDiskSpace
Drive=C:

[MeasureCUsedDiskSpace]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1

[MeasureCTotalDiskSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1

[MeterCDriveInfo]
Meter=String
MeasureName=MeasureCDiskLabel
MeasureName2=MeasureCFreeDiskSpace
MeasureName3=MeasureCUsedDiskSpace
MeasureName4=MeasureCTotalDiskSpace
X=0
Y=0
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="C:\%1 [Free: %2B] [Used: %3B] [Total: %4B]"

[MeasureDDiskLabel]
Measure=FreeDiskSpace
Drive=D:
Label=1


[MeasureDFreeDiskSpace]
Measure=FreeDiskSpace
Drive=D:

[MeasureDUsedDiskSpace]
Measure=FreeDiskSpace
Drive=D:
InvertMeasure=1

[MeasureDTotalDiskSpace]
Measure=FreeDiskSpace
Drive=D:
Total=1

[MeterDDriveInfo]
Meter=String
MeasureName=MeasureDDiskLabel
MeasureName2=MeasureDFreeDiskSpace
MeasureName3=MeasureDUsedDiskSpace
MeasureName4=MeasureDTotalDiskSpace
X=0
Y=20
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="D:\%1 [Free: %2B] [Used: %3B] [Total: %4B]"

[MeasureEDiskLabel]
Measure=FreeDiskSpace
Drive=E:
Label=1

[MeasureEFreeDiskSpace]
Measure=FreeDiskSpace
Drive=E:

[MeasureEUsedDiskSpace]
Measure=FreeDiskSpace
Drive=E:
InvertMeasure=1

[MeasureETotalDiskSpace]
Measure=FreeDiskSpace
Drive=E:
Total=1

[MeterEDriveInfo]
Meter=String
MeasureName=MeasureEDiskLabel
MeasureName2=MeasureEFreeDiskSpace
MeasureName3=MeasureEUsedDiskSpace
MeasureName4=MeasureETotalDiskSpace
X=0
Y=40
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="E:\%1 [Free: %2B] [Used: %3B] [Total: %4B]"

[MeasureFDiskLabel]
Measure=FreeDiskSpace
Drive=F:
Label=1

[MeasureFFreeDiskSpace]
Measure=FreeDiskSpace
Drive=F:

[MeasureFUsedDiskSpace]
Measure=FreeDiskSpace
Drive=F:
InvertMeasure=1

[MeasureFTotalDiskSpace]
Measure=FreeDiskSpace
Drive=F:
Total=1

[MeterFDriveInfo]
Meter=String
MeasureName=MeasureFDiskLabel
MeasureName2=MeasureFFreeDiskSpace
MeasureName3=MeasureFUsedDiskSpace
MeasureName4=MeasureFTotalDiskSpace
X=0
Y=60
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="F:\%1 [Free: %2B] [Used: %3B] [Total: %4B]"
-Brian
John877
Posts: 4
Joined: October 12th, 2012, 4:37 am

Re: Cant figure this one out.

Post by John877 »

Well good to know I wasnt TOO far off at least. considering Ive not really used this program before. :D

Thanks for that.

Another thing, If not too much to change, is it possible to have the "C:\Windows" part left aligned and the rest of it aligned to the right so the numbers and such line up?
User avatar
Brian
Developer
Posts: 2695
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Cant figure this one out.

Post by Brian »

John877 wrote:Another thing, If not too much to change, is it possible to have the "C:\Windows" part left aligned and the rest of it aligned to the right so the numbers and such line up?
Yes, but it will involve adding additional String meters using the StringAlign option.

-Brian
John877
Posts: 4
Joined: October 12th, 2012, 4:37 am

Re: Cant figure this one out.

Post by John877 »

Can you give an example? How would I break them up?
User avatar
Brian
Developer
Posts: 2695
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Cant figure this one out.

Post by Brian »

Code: Select all

[MeterCDriveInfo]
Meter=String
MeasureName=MeasureCDiskLabel
X=0
Y=0
W=365
H=20
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
Text="C:\%1"

[MeasureCDriveInfo2]
Meter=String
MeasureName=MeasureCFreeDiskSpace
MeasureName2=MeasureCUsedDiskSpace
MeasureName3=MeasureCTotalDiskSpace
X=365
Y=0
FontSize=10
FontColor=255,255,255,255
AntiAlias=0
AutoScale=1
StringAlign=Right
Text="[Free: %1B] [Used: %2B] [Total: %3B]"
Of course this is just for the 'C' drive, you will have to add the rest.

BTW - You will like MeterStyles. Makes your code much shorter.

-Brian
John877
Posts: 4
Joined: October 12th, 2012, 4:37 am

Re: Cant figure this one out.

Post by John877 »

This can be closed now unless you leave things open for others to comment or ask further updates.


Thanks for the help. :D