It is currently May 1st, 2024, 9:33 am

Illustro Disk space help

Get help with creating, editing & fixing problems with skins
Iconic985
Posts: 6
Joined: September 3rd, 2012, 7:49 am

Illustro Disk space help

Post by Iconic985 »

Hello all
I have created a variant of the Disks2.ini from the Illustro Rainmeter theme. What it does is measures the space of a removable disk plugged into my PC. I was wondering if there was a way to make it so that if there are no disks plugged in it would say "no disk detected" or something instead of just saying 0.00 out of 0.00 bytes used.



Peace : :great:
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Illustro Disk space help

Post by Kaelri »

You can use the FreeDiskSpace measure to get the "type," or status, of a drive. If there is no drive plugged in, the type shown will be "0" (error) or "1" (removed).

You can combine this with IfActions to change the text when the drive is plugged in or removed. For example:

Code: Select all

[measureTypeDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Type=1
IfBelowValue=2
IfBelowAction=!SetOption meterValueDisk2 Text "No Disk Detected"
IfAboveValue=1
IfAboveAction=!SetOption meterValueDisk2 Text "%1B/%2B used"
Note: you may also need to set IgnoreRemovable=0 on the FreeDiskSpace measure for your drive to show up.
Iconic985
Posts: 6
Joined: September 3rd, 2012, 7:49 am

Re: Illustro Disk space help

Post by Iconic985 »

Thanks worked like a charm! :thumbup:

BUT :o

I also have a skin that measures my network drives and I tried this code for them and it didn't work. Is there something I have to change to make it work?

Thanks :great: