It is currently February 19th, 2020, 11:43 am

Optical Drive Status Plugin

Share and get help with Plugins and Addons
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

No, you're not missing anything, this was only a proof of concept than a real useful skin.

Code: Select all

!WriteKeyValue "SkinPath\SkinFolder" Active "0" "#SETTINGSPATH#Rainmeter.ini"
...or much better:

Code: Select all

!ToggleConfig "SkinPath\SkinFolder" "Skin.ini"
I simply put all this aside just because there are too many variables to take in account to make it distributable, the first one: adapt to any screen size.
Have a small display simulating the "real one" is cool, with tiny images representing each skin, click on it to make some changes... but there are too many screen resolutions.
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

balala wrote:Still not very sure how are you disabling / enabling a skin (not a measure, but a skin). And finally what means this? If I'm not wrong, a measure can be enabled / disabled, but a skin? Am I missing something?
Sorry, probably I didn't use the best words... and I confused you. :oops:
User avatar
balala
Rainmeter Sage
Posts: 9711
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Optical Drive Status Plugin

Post by balala »

fonpaolo wrote:No, you're not missing anything, this was only a proof of concept than a real useful skin.

Code: Select all

!WriteKeyValue "SkinPath\SkinFolder" Active "0" "#SETTINGSPATH#Rainmeter.ini"
...or much better:

Code: Select all

!ToggleConfig "SkinPath\SkinFolder" "Skin.ini"
Ok, now I see you're talking about loading / unloading the specific skin.
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

The last code is for load/unload skins, but I also use another way to add/remove some parts or specific functions of a skin, using .inc files and managing the @include option.

As a side note, balala, I've to thank you, without your questions about my "wrong" words, probably I would've lost my Layout sub-skin (as I named it).
Trying to remember how I created it, I didn't found it in my computer, only in one of my usb stick...
Even if I'll never use it, I always keep my various steps and test skins and now I have backed it up. :D
User avatar
balala
Rainmeter Sage
Posts: 9711
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Optical Drive Status Plugin

Post by balala »

You're welcome, if you really think I helped.
Bekarfel
Posts: 203
Joined: May 16th, 2012, 5:38 am

Re: Optical Drive Status Plugin

Post by Bekarfel »

I tried the skin out, and it says I have two optical drives present, however it displays the same drive letter for each drive (I have G: and R:, but the skin displays R: and R:) and I can't display the G: drive in the settings.
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
User avatar
balala
Rainmeter Sage
Posts: 9711
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Optical Drive Status Plugin

Post by balala »

Bekarfel wrote:I tried the skin out, and it says I have two optical drives present, however it displays the same drive letter for each drive (I have G: and R:, but the skin displays R: and R:) and I can't display the G: drive in the settings.
The Settings skin determines the drive type with FreeDiskSpace measures. This measures, if the Type=1 option is set, returns CDRom for the optical drives (see here what can return the measure).
I'm not sure why R: is shown twice, but first please copy the following code to a skin and load it:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[Variables]
Drive1=C:
Drive2=G:
Drive3=R:

[MeasureDriveType1]
Measure=FreeDiskSpace
Drive=#Drive1#
Type=1

[MeasureDriveType2]
Measure=FreeDiskSpace
Drive=#Drive2#
Type=1

[MeasureDriveType3]
Measure=FreeDiskSpace
Drive=#Drive3#
Type=1

[MeterDrives]
Meter=STRING
MeasureName=MeasureDriveType1
MeasureName2=MeasureDriveType2
MeasureName3=MeasureDriveType3
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Drive #Drive1# %1#CRLF#Drive #Drive2# %2#CRLF#Drive #Drive3# %3
LeftMouseUpAction=[!SetClip "Drive #Drive1# [MeasureDriveType1] / Drive #Drive2# [MeasureDriveType2] / Drive #Drive3# [MeasureDriveType3]"]
This skin will show the type of the C:, G: and R: drives (I added C: for testing purposes). What it shows (just click the skin, the string will be copied and pase it here)?
Bekarfel
Posts: 203
Joined: May 16th, 2012, 5:38 am

Re: Optical Drive Status Plugin

Post by Bekarfel »

Here is the output of the skin you indicated:
Drive C: Fixed / Drive G: CDRom / Drive R: CDRom
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
User avatar
balala
Rainmeter Sage
Posts: 9711
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Optical Drive Status Plugin

Post by balala »

Bekarfel wrote:Here is the output of the skin you indicated:
Drive C: Fixed / Drive G: CDRom / Drive R: CDRom
Weird!
But now I'd like to check the values of the ShowDrive7 and ShowDrive18 (belonging to the G: and R: drives) variables, so, please load again the following code and same as previously, click the skin to copy the returned value and paste it here. Thanks.

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[Variables]
CDROM=6
Drive7=G:
Drive18=R:

[MeasureDriveType7]
Measure=FreeDiskSpace
Drive=#Drive7#
Type=1
IfCondition=(MeasureDriveType7=#CDROM#)
IfTrueAction=[!SetVariable ShowDrive7 "1"]
IfFalseAction=[!SetVariable ShowDrive7 "0"]

[MeasureDriveType18]
Measure=FreeDiskSpace
Drive=#Drive18#
Type=1
IfCondition=(MeasureDriveType18=#CDROM#)
IfTrueAction=[!SetVariable ShowDrive18 "1"]
IfFalseAction=[!SetVariable ShowDrive18 "0"]

[MeterDrives]
Meter=STRING
MeasureName=MeasureDriveType7
MeasureName2=MeasureDriveType18
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=7: #Drive7# #ShowDrive7##CRLF#18: #Drive18# #ShowDrive18#
LeftMouseUpAction=[!SetClip "7: #Drive7# #ShowDrive7# / 18: #Drive18# #ShowDrive18#"]
DynamicVariables=1
Bekarfel
Posts: 203
Joined: May 16th, 2012, 5:38 am

Re: Optical Drive Status Plugin

Post by Bekarfel »

New test skin says:
7: G: 1 / 18: R: 1
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...