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

Optical Drive Status Plugin

Share and get help with Plugins and Addons
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:I hope the names are correctly translated, it's in the third label on the right, Visualization, Select columns... it's named CPU Time.
Here's a screenshot, sorry, it's in Italian.
No problem with the Italian, thanks. That's an interesting feature, I had no idea about it. The CPU time (Tempo CPU) have to be set to be shown, by default (at least on my system) it's not visible, but it can easily be set to be. I'll have to study this feature, these days.
Well, as I many times said, there's always something new to learn (even if this one is not strictly related to Rainmeter).
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

Yes, also for me it has to be set.
I always set up my computer as I want, at the end I enable a lot of hidden features and at the opposite, I disable most of the "normal" and useless.

For me (maybe only for me) it's important to have this kind of measures enabled for Rainmeter, as I said, It can tell you how much a skin (or a suite) can affect system performance and set a limit of use for less powerful configurations.
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

After some brief testing, I can confirm your plugin uses some cpu, the strange is that it uses less cpu when UpdateDivider is disabled (so it uses the default 1000) than when using UpdateDivider=10. :confused:
That's not a great cpu usage, so I can live with it, since it does all I need and even more. :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 »

fonpaolo wrote:After some brief testing, I can confirm your plugin uses some cpu, the strange is that it uses less cpu when UpdateDivider is disabled (so it uses the default 1000) than when using UpdateDivider=10. :confused:
That's indeed strange. I can't explain.
fonpaolo wrote:That's not a great cpu usage, so I can live with it, since it does all I need and even more. :D
In the meantime I also did a few tests, trying the plugin on my old (very old, 10 year+) computer, and it's also working there.
I'm glad if you find this plugin useful, even if it indeed increases a bit the CPU usage.
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

I still have to investigate another "strangeness" I noticed today (it's already happened, but I thought about it only today...).
For the moment I noticed this only using the standard Update, but it's already strange.

Sometimes I have to refresh all, since I'm using WiFi, when it starts late, my skins using internet are stuck.
After the refresh, my Time skin (the one which uses your plugin) is stuck using some more cpu (usually not less than 1%)
If/when disabled it goes down to 0% and the only way is to unload and reload the skin... another refresh (of the skin) does nothing.

I still have to test it with UpdateDivider, when I can find some more time.

The code I'm using:

Code: Select all

[MeasureDVD1Status]
Measure=Plugin
Plugin=OpticalDriveStatus
Drive=#DVD1#
OnChangeAction=[!UpdateMeasure MeasureDVD1Condition][!UpdateMeasure MeasureDVDInfo]
;UpdateDivider=10
Disabled=#DVD1On#

[MeasureDVD1Condition]
Measure=Calc
Formula=[MeasureDVD1Status:]
IfCondition=(MeasureDVD1Condition=0)
IfTrueAction=[!HideMeter MeterDVD1Icon][!UpdateMeter MeterDVD1Icon][!SetOption MeterDVD1DriveButton RightMouseUpAction """["#@#Addons\nircmd\nircmd.exe" cdrom open #DVD1#]"""][!SetOption MeterDVD1DriveButton ButtonCommand "[]"][!SetOption MeterDVD1DriveButton ToolTipText "#DVDRem_0#"][!UpdateMeter MeterDVD1DriveButton][!Redraw]
IfCondition2=(MeasureDVD1Condition=1)
IfTrueAction2=[!ShowMeter MeterDVD1Icon][!SetOption MeterDVD1Icon ImageName "#@#Images\Time1\DVD_0.png"][!UpdateMeter MeterDVD1Icon][!SetOption MeterDVD1DriveButton RightMouseUpAction """["#@#Addons\nircmd\nircmd.exe" cdrom close #DVD1#]"""][!SetOption MeterDVD1DriveButton ButtonCommand "[]"][!SetOption MeterDVD1DriveButton ToolTipText "#DVDRem_1#"][!UpdateMeter MeterDVD1DriveButton][!Redraw]
IfCondition3=(MeasureDVD1Condition=2)
IfTrueAction3=[!ShowMeter MeterDVD1Icon][!SetOption MeterDVD1Icon ImageName "#@#Images\Time1\DVD.png"][!UpdateMeter MeterDVD1Icon][!SetOption MeterDVD1DriveButton RightMouseUpAction """["#@#Addons\nircmd\nircmd.exe" cdrom open #DVD1#]"""][!SetOption MeterDVD1DriveButton ButtonCommand """["#DVD1#"]"""][!SetOption MeterDVD1DriveButton ToolTipText "#DVDRem_0#"][!UpdateMeter MeterDVD1DriveButton][!Redraw]
DynamicVariables=1
UpdateDivider=-1
Disabled=#DVD1On#

[MeasureDVDInfo]
Measure=Freediskspace
Drive=#DVD1#
Label=1
UpdateDivider=-1
Disabled=#DVD1On#
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:Sometimes I have to refresh all, since I'm using WiFi, when it starts late, my skins using internet are stuck.
After the refresh, my Time skin (the one which uses your plugin) is stuck using some more cpu (usually not less than 1%)
If/when disabled it goes down to 0% and the only way is to unload and reload the skin... another refresh (of the skin) does nothing.
How do you disable a skin? Or you're disabling all measures of the skin? Could you post the whole code, please?
User avatar
fonpaolo
Moderator
Posts: 1338
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Optical Drive Status Plugin

Post by fonpaolo »

I disable measures if used or not, with Disabled=#DVD1On#.
In my "Options" skin, where the user can easily configure almost everything, you can enable or disable measures, meters (well, better say show and hide) or parts of a skin.
In this case simply leaving empty the text box corresponding to the DVD drive, the code is:

Code: Select all

;VERIFY DVD PRESENCE ----------------------------------------------------

[MeasureDVDDrive]
Measure=String
String=#DVD1#
IfMatch=^$
IfMatchAction=[!WriteKeyValue Variables DVD1On 1  "#@#Config.inc"]
IfNotMatchAction=[!WriteKeyValue Variables DVD1On 0  "#@#Config.inc"]
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:I disable measures if used or not, with Disabled=#DVD1On#.
In my "Options" skin, where the user can easily configure almost everything, you can enable or disable measures, meters (well, better say show and hide) or parts of a skin.
Sorry, probably I misunderstood your previous post, because when you said
fonpaolo wrote:After the refresh, my Time skin (the one which uses your plugin) is stuck using some more cpu (usually not less than 1%)
If/when disabled it goes down to 0%
I understood that you're disabling the skin. That's why I asked how do you disable a skin. Obviously I know how to disable/enable a measure.
However I still don't know why you have to unload/reload the skin and why a simple refresh doesn't do the job. Not knowing the exact skin, I can't say. That's why I asked on my last reply to post the whole code (or upload the packaged config?).
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:Sorry, probably I misunderstood your previous post, because when you said

I understood that you're disabling the skin. That's why I asked how do you disable a skin. Obviously I know how to disable/enable a measure.
I already found how to enable and/or disable one or more skins*, but at the moment I think to focus on more important improvements.
* At the moment, using WebParser, I can read the Rainmeter.ini file, display the skins, even their position on a small screen representation and then enable or disable them.
balala wrote:However I still don't know why you have to unload/reload the skin and why a simple refresh doesn't do the job. Not knowing the exact skin, I can't say. That's why I asked on my last reply to post the whole code (or upload the packaged config?).
The whole code... well, it's a secret! ;-) :lol:
You can download it in my DA page, use the link below, the only difference is the code I posted here in my previous posts.
There are some other differences from the code I'm using, but only because I've condensed more variants in one skin, using the included .inc files to enable, disable, add or remove some features.
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:I already found how to enable and/or disable one or more skins*
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?