It is currently May 6th, 2024, 1:42 pm

Drive indicator?

Get help with creating, editing & fixing problems with skins
veilx
Posts: 2
Joined: February 21st, 2010, 9:48 am

Drive indicator?

Post by veilx »

So, I have an external drive... but I can't always see the light indicator showing me that it's on... so I forget to turn it off at times.

Is their a certain measure to show if the drive is online or off? Much like a status LED indicator, but on my computer screen. (or a similar trick to get the effect?)
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Drive indicator?

Post by Alex2539 »

All you need to do is have a FreeDiskSpace measure read the total size of the drive. If the drive is off, it will be 0. Then, just have something happen when that measure is 0. Here is an example:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Drive]
Measure=FreeDiskSpace
Drive=F:
Total=1
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterHideMeter DriveOff][!RainmeterShowMeter DriveOn]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterShowMeter DriveOff][!RainmeterHideMeter DriveOn]

[DriveOn]
Meter=String
SolidColor=FFFFFF
FontColor=00FF00
Text=DRIVE IS ON

[DriveOff]
Meter=String
SolidColor=FFFFFF
FontColor=FF0000
Text=DRIVE IS OFF
ImageImageImageImage
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Drive indicator?

Post by jsmorley »

Alex2539 wrote:All you need to do is have a FreeDiskSpace measure read the total size of the drive. If the drive is off, it will be 0. Then, just have something happen when that measure is 0. Here is an example:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Drive]
Measure=FreeDiskSpace
Drive=F:
Total=1
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterHideMeter DriveOff][!RainmeterShowMeter DriveOn]
IfEqualValue=0
IfEqualAction=!Execute [!RainmeterShowMeter DriveOff][!RainmeterHideMeter DriveOn]

[DriveOn]
Meter=String
SolidColor=FFFFFF
FontColor=00FF00
Text=DRIVE IS ON

[DriveOff]
Meter=String
SolidColor=FFFFFF
FontColor=FF0000
Text=DRIVE IS OFF
I suspect you will need

IgnoreRemovable=0

on the measure as well.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Drive indicator?

Post by Alex2539 »

I tried it myself before posting and it worked. I don't think it's necessary for powered drives, just flash drives.
ImageImageImageImage
veilx
Posts: 2
Joined: February 21st, 2010, 9:48 am

Re: Drive indicator?

Post by veilx »

GENIUS! Thank you guys so much!<3