Help with recycle bin image if condition
Posted: November 25th, 2017, 9:30 pm
Hi,
I'm trying to make a Recycle Bin skin which changes to reflect how full the bin is. For example, if the recycle bin has items which collectively are equal to or less than 256 MB, I want it to show an image which looks quarter full. If it's less than 512 MB, I want it to show an image which looks half full. If it's less than 768 MB I want it to show a three quarters full recycle bin and if it's above 768 MB, I want it to show a full recycle bin. I've already made the icons in photoshop. I tried if conditions, but they don't seem to work. Can anyone please help?
Here's my code.
I'm trying to make a Recycle Bin skin which changes to reflect how full the bin is. For example, if the recycle bin has items which collectively are equal to or less than 256 MB, I want it to show an image which looks quarter full. If it's less than 512 MB, I want it to show an image which looks half full. If it's less than 768 MB I want it to show a three quarters full recycle bin and if it's above 768 MB, I want it to show a full recycle bin. I've already made the icons in photoshop. I tried if conditions, but they don't seem to work. Can anyone please help?
Here's my code.
Code: Select all
[Rainmeter]
Update=3000
;______________________________;
;-------VARIABLES------;
[Variables]
Imgname=#@#Images\Recycle Bin Empty.png
;______________________________;
;-------MEASURES-------;
[measureBinSize]
; Returns the total size of the Recycle Bin in bytes.
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Size
UpdateDivider=3
IfCondition=(MeasureBinSize = 0)
IfTrueAction=[!SetVariable Imgname "#@#Images\Recycle Bin Empty.png"]
IfCondition=(MeasureBinSize > 0) && (MeasureBinSize <= 268435456)
IfTrueAction=[!SetVariable Imgname "#@#Images\Recycle Bin One Quarter.png"]
IfCondition=(MeasureBinSize > 268435456) && (MeasureBinSize <= 536870912)
IfTrueAction=[!SetVariable Imgname "#@#Images\Recycle Bin Half.png"]
IfCondition=(MeasureBinSize > 536870912) && (MeasureBinSize <= 805306368)
IfTrueAction=[!SetVariable Imgname "#@#Images\Recycle Bin Three Quarters.png"]
IfCondition=MeasureBinSize > 805306368
IfTrueAction=[!SetVariable Imgname "#@#Images\Recycle Bin Full.png"]
OnUpdateAction=[!UpdateMeter MeterImage][!Redraw]
[MeterImage]
Meter=Image
ImageName=#Imgname#
H=100
PreserveAspectRatio=1
DynamicVariables=1