It is currently April 18th, 2024, 4:30 am

Refreshing issue

Get help with creating, editing & fixing problems with skins
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Refreshing issue

Post by pul53dr1v3r »

Hi. I've a little issue to make the bar color changes imediatelly after a click, independently of the value of UpdateDivider:

Variables:

Code: Select all

Update=1000
.
.
colorBar=255,140,0,200
ColorR=255,140,0,200
colorText=255,255,255,205
EmptyBarColor=255,255,255,25
HD1=F:
UpdateInterval=1
SkinState=1
DiskMeasureState=0
It shares the update time of [measureUsedHD1] and [measureFreeHD1] measures, for now. Looks slow even with UpdateDivire=1, let alone any higher value.

Code: Select all

[measureDiskMeasureState]
Measure=Calc
Formula=#DiskMeasureState#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!ShowMeterGroup "UsedHD1"][!HideMeterGroup "FreeHD1"][!DisableMeasure "measureFreeHD1"][!EnableMeasure "measureUsedHD1"][!Update]
IfFalseAction=[!ShowMeterGroup "FreeHD1"][!HideMeterGroup "UsedHD1"][!DisableMeasure "measureUsedHD1"][!EnableMeasure "measureFreeHD1"][!Update]
DynamicVariables=1

[meterUsedHD1]
Meter=STRING
MeterStyle=styleLeftText
MeasureName=measureUsedHD1
X=10
Y=40
Text="Used: %1B"
Hidden=1
NumOfDecimals=1
Autoscale=1
Group=UsedHD1
LeftMouseUpAction=[!SetVariable "DiskMeasureState" "1"][!WriteKeyValue "Variables" "DiskMeasureState" "1"][!UpdateMeasure "measureDiskMeasureState"]
MouseOverAction=[!SetOption "meterUsedHD1" "FontColor" "#ColorR#"][!UpdateMeter "meterUsedHD1"][!Redraw]
MouseLeaveAction=[!SetOption "meterUsedHD1" "FontColor" "#colorText#"][!UpdateMeter "meterUsedHD1"][!Redraw]

[meterFreeHD1]
Meter=STRING
MeterStyle=styleLeftText
MeasureName=measureFreeHD1
X=10
Y=40
Text="Free: %1B"
Hidden=1
NumOfDecimals=1
Autoscale=1
Group=FreeHD1
LeftMouseUpAction=[!SetVariable "DiskMeasureState" "0"][!WriteKeyValue "Variables" "DiskMeasureState" "0"][!UpdateMeasure "measureDiskMeasureState"]
MouseOverAction=[!SetOption "meterFreeHD1" "FontColor" "#ColorR#"][!UpdateMeter "meterFreeHD1"][!Redraw]
MouseLeaveAction=[!SetOption "meterFreeHD1" "FontColor" "#colorText#"][!UpdateMeter "meterFreeHD1"][!Redraw]

[MeasureDiskLabel]
Measure=FreeDiskSpace
Drive=#HD1#
Label=1
IgnoreRemovable=0
UpdateDivider=#UpdateInterval#

[meterValueHD1]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedHD1
MeasureName2=measureTotalHD1
X=199
Y=r
Text="Total: %2B"
NumOfDecimals=1
AutoScale=1

[meterUsedBarHD1]
Meter=BAR
MeasureName=measureUsedHD1
BarColor=[UsedBarWarn]
SolidColor=255,255,255,25
X=10
Y=52
W=190
H=1
Flip=0
BarOrientation=HORIZONTAL
DynamicVariables=1
Group=UsedHD1

[meterFreeBarHD1]
Meter=BAR
MeasureName=measureFreeHD1
BarColor=[FreeBarWarn]
SolidColor=255,255,255,25
X=10
Y=52
W=190
H=1
Flip=1
BarOrientation=HORIZONTAL
DynamicVariables=1
Group=FreeHD1

[meterBarEmptyHD1]
Meter=Image
SolidColor=#EmptyBarColor#
X=0r
Y=0r
W=190
H=1
Hidden=1

[UsedBarWarn]
Measure=Calc
Formula=DriveUsagePercent> 75 ? -1 : -2
Substitute="-1":"220,20,60,200","-2":"#colorBar#"

[FreeBarWarn]
Measure=Calc
Formula=DriveFreePercent< 25 ? -1 : -2
Substitute="-1":"220,20,60,200","-2":"192,192,192,200"

[DriveUsagePercent]
Measure=Calc
Formula=( measureUsedHD1 * 100 / ( measureTotalHD1 + 0.000001 ))
MinValue=0
MaxValue=100

[DriveFreePercent]
Measure=Calc
Formula=( measureFreeHD1 * 100 / ( measureTotalHD1 + 0.000001 ))
MinValue=0
MaxValue=100

[measureTotalHD1]
Measure=FreeDiskSpace
Drive=#HD1#
Total=1
IgnoreRemovable=0
UpdateDivider=#UpdateInterval#

[measureUsedHD1]
Measure=FreeDiskSpace
Drive=#HD1#
InvertMeasure=1
IgnoreRemovable=0
IfCondition=measureUsedHD1=0
IfTrueAction=[!HideMeter "meterUsedBarHD1"][!ShowMeter "meterBarEmptyHD1"]
IfFalseAction=[!ShowMeter "meterUsedBarHD1"][!HideMeter "meterBarEmptyHD1"]
UpdateDivider=#UpdateInterval#
Group=UsedHD1

[measureFreeHD1]
Measure=FreeDiskSpace
Drive=#HD1#
;InvertMeasure=0
IgnoreRemovable=0
IfCondition=measureFreeHD1=0
IfTrueAction=[!HideMeter "meterFreeBarHD1"][!ShowMeter "meterBarEmptyHD1"]
IfFalseAction=[!ShowMeter "meterFreeBarHD1"][!HideMeter "meterBarEmptyHD1"]
UpdateDivider=#UpdateInterval#
Group=FreeHD1
JUst to mention, red color of the bar is warning color and it should appear only when used drive space reaches 75% of used or less than 25% of free space depending on the bar we watch (for free or used space, toggling on click).

VIDEO proof: https://youtu.be/icuLOxuhEA8
Last edited by pul53dr1v3r on March 7th, 2018, 5:50 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing issue

Post by balala »

I can't replicate the issue. When I click the change is (almost) instantaneous.
Although I'm not sure this will help, eventually try replacing the last [!Update] bang in the IfTrueAction and IfFalseAction options of the [measureDiskMeasureState] measure with [!UpdateMeasure "measureUsedHD1"] and respectively [!UpdateMeasure "measureFreeHD1"]:

Code: Select all

[measureDiskMeasureState]
Measure=Calc
Formula=#DiskMeasureState#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!ShowMeterGroup "UsedHD1"][!HideMeterGroup "FreeHD1"][!DisableMeasure "measureFreeHD1"][!EnableMeasure "measureUsedHD1"][!UpdateMeasure "measureUsedHD1"]
IfFalseAction=[!ShowMeterGroup "FreeHD1"][!HideMeterGroup "UsedHD1"][!DisableMeasure "measureUsedHD1"][!EnableMeasure "measureFreeHD1"][!UpdateMeasure "measureFreeHD1"]
DynamicVariables=1
If this doesn't help, please pack and upload the config. As I said, I don't get the described issue, so I'd like to try the skin as you have it now.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Refreshing issue

Post by pul53dr1v3r »

Try with !UpdateMeter just makes more issues (with labels ) and doesn't solve the old one.

Here is the packed skin:
Dowload skin
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing issue

Post by balala »

I'm sorry, but don't know what to say, because when I click, the skin updates instantaneously. :confused:
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Refreshing issue

Post by pul53dr1v3r »

It updates immediately but not with right colors. If your disk drive isn't used more than 74%, you should see only orange (for used space bar) and grey (for free). But it show red in the meantime (red is the warning color for almost Full drive).
Changing UpdateInterval Variable to any higher value will show you the trouble a bit better.

Edit: it appears only when you are clicking on the labels Used: / Free:.
So, red color should only appear when the drive is either 25% to be full or if empty space is less than 75 percents.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Refreshing issue

Post by pul53dr1v3r »

dvo wrote:170gig used turning red of 229gb :17nodding
it works perfectly, just causes some lags with colors (showing red sometimes) when we are clicking on the labels to change it.
Did you see the video i posted?
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing issue

Post by balala »

Pul53dr1v3r wrote:it works perfectly, just causes some lags with colors (showing red sometimes) when we are clicking on the labels to change it.
Yep, I see now, you're right. Trying to figure out something. Not too much success yet.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Refreshing issue

Post by pul53dr1v3r »

dvo wrote:lower your update to 16 and you only have 2 blink and it oke :P
Do so and take a look at your CPU usage. ;)
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing issue

Post by balala »

I think there is a problem with the whole skin. Finally I think you don't need both measures [measureUsedHD1] and [measureFreeHD1], because they are not independent measures.
I'd try to rewrite the whole skin. Unfortunately right now I have no more time, because here the midnight is coming and tomorrow in the morning I have to go to work, so now I'm going to sleep a bit. But if you still won't figure out what's going on, tomorrow afternoon I'll take one more look and will try to rewrite the skin.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: Refreshing issue

Post by pul53dr1v3r »

balala wrote:
Unbeliveable that the whole skin need to be touched. I was trying with some solutions, but no success. If i fugure out a right way to solve this, i'll let you know.
If it would be too hard to solve, just give up.

I've had a similar thought about [measureUsedHD1] and [measureFreeHD1] as they use the same measure "FreeDiskSpace", but not sure how to change it.