It is currently April 18th, 2024, 10:53 am

First skins developing questions

Get help with creating, editing & fixing problems with skins
Madzina
Posts: 5
Joined: August 27th, 2015, 2:37 pm

First skins developing questions

Post by Madzina »

First time writing on the forum, so Hi.

I have one simple question to ask. Is it possible to automatically detect number of hard drives connected to computer?

For example now i have C: and D: drive. But sometimes i connect another e.g E: drive.
Normally i want two histograms, etc. each dedicated for other drive, but when new drive arrive i want to automatically crate new histogram, etc. for that drive. And so on.
Bez tytułu.png
I dont want it to be visible when not connected. :D

Thx for help, sorry for my English :)
You do not have the required permissions to view the files attached to this post.
Last edited by Madzina on August 27th, 2015, 9:34 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Automatically detecting new hard drives

Post by balala »

You could create so many FreeDiskSpace measures as the largest number of disks you can have. These maesures should measure the total drive space for each disk. If for a disk this space is 0, then that disk isn't present, so the corresponding histogram should be hidden. If the space is larger then 0, the corresponding histogram should be visible.
The following code works for 6 disks (C: - H:). Adding more FreeDiskSpace measures and meters, you can make it to work for any number of disks. I haven't created the histograms, added just string meters, hoping you'll be able to create the histograms as you want:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
BackgroundMode=2
SolidColor=80,80,80,200

[Variables]
Disk1=C:
Disk2=D:
Disk3=E:
Disk4=F:
Disk5=G:
Disk6=H:

[StringStyle]
Padding=15,5,15,5
FontColor=220,220,220
FontSize=10
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1

[MeasureTotalDiskSpace1]
Measure=FreeDiskSpace
Drive=#Disk1#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace1>0)
IfTrueAction=[!ShowMeter "MeterDisk1"]
IfFalseAction=[!HideMeter "MeterDisk1"]

[MeasureTotalDiskSpace2]
Measure=FreeDiskSpace
Drive=#Disk2#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace2>0)
IfTrueAction=[!ShowMeter "MeterDisk2"]
IfFalseAction=[!HideMeter "MeterDisk2"]
IgnoreRemovable=0

[MeasureTotalDiskSpace3]
Measure=FreeDiskSpace
Drive=#Disk3#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace3>0)
IfTrueAction=[!ShowMeter "MeterDisk3"]
IfFalseAction=[!HideMeter "MeterDisk3"]
IgnoreRemovable=0

[MeasureTotalDiskSpace4]
Measure=FreeDiskSpace
Drive=#Disk4#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace4>0)
IfTrueAction=[!ShowMeter "MeterDisk4"]
IfFalseAction=[!HideMeter "MeterDisk4"]
IgnoreRemovable=0

[MeasureTotalDiskSpace5]
Measure=FreeDiskSpace
Drive=#Disk5#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace5>0)
IfTrueAction=[!ShowMeter "MeterDisk5"]
IfFalseAction=[!HideMeter "MeterDisk5"]
IgnoreRemovable=0

[MeasureTotalDiskSpace6]
Measure=FreeDiskSpace
Drive=#Disk6#
Total=1
UpdateDivider=5
IfCondition=(MeasureTotalDiskSpace6>0)
IfTrueAction=[!ShowMeter "MeterDisk6"]
IfFalseAction=[!HideMeter "MeterDisk6"]
IgnoreRemovable=0

[MeterDisk1]
Meter=STRING
X=0
Y=0
MeterStyle=StringStyle
Text=#Disk1# is present

[MeterDisk2]
Meter=STRING
X=0r
Y=0R
MeterStyle=StringStyle
Text=#Disk2# is present

[MeterDisk3]
Meter=STRING
X=0r
Y=0R
MeterStyle=StringStyle
Text=#Disk3# is present

[MeterDisk4]
Meter=STRING
X=0r
Y=0R
MeterStyle=StringStyle
Text=#Disk4# is present

[MeterDisk5]
Meter=STRING
X=0r
Y=0R
MeterStyle=StringStyle
Text=#Disk5# is present

[MeterDisk6]
Meter=STRING
X=0r
Y=0R
MeterStyle=StringStyle
Text=#Disk6# is present
Madzina
Posts: 5
Joined: August 27th, 2015, 2:37 pm

Re: Automatically detecting new hard drives

Post by Madzina »

Thx you very much. This way is quite good :) I was thinking that i could use Lua in some way, but this will works for me
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Automatically detecting new hard drives

Post by balala »

Glad to help.
Madzina
Posts: 5
Joined: August 27th, 2015, 2:37 pm

Re: Automatically detecting new hard drives

Post by Madzina »

One more thing.

Where can i find documentation of this plugins:
http://docs.rainmeter.net/manual/plugins

I can't find any on this forum or on rainmeter website. I don't have any troubles with meters, i learned them when adjusting skins design for my needs. But i can't find any documentation for measures and plugins.

And I'm done with others skins and going to do my own ;) ofc I will share them with you :D maybe someone will like them
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Automatically detecting new hard drives

Post by balala »

On the manual click on the left panel to Plugins (this will go to the http://docs.rainmeter.net/manual/plugins page), then on the same left panel click to the plugin you want to get help with. On the same left panel you have the measures sections (click to the Measures then to the measure name you want to get help with). Also could take a look in the formum to Plugins & Addons section. On the forum you don't have a section refering to measures, but if you have troubles with any of them usualy you can post to the Help: Rainmeter Skins section (where you've posted your first question too).
Madzina
Posts: 5
Joined: August 27th, 2015, 2:37 pm

Re: First skins developing questions

Post by Madzina »

I changed topic title and i will ask questions right there. Thx for help

First skin done ;) Working as i wanted to
1.JPG
2.JPG
3.JPG
Now i will start w CPU skin
You do not have the required permissions to view the files attached to this post.
Madzina
Posts: 5
Joined: August 27th, 2015, 2:37 pm

Re: First skins developing questions

Post by Madzina »

Job done for now ;)
1.JPG
You do not have the required permissions to view the files attached to this post.