I'm still new to Rainmeter, let alone making my own skin so forgive me if this is an easy problem
I'm making my image launcher for the recycle bin and was wondering how to have its icon change when the bin is full like it would in normal Windows. I tried looking around a little bit to see if anyone has asked this before and was resolved but couldn't find any.
What code do I use? Was this something taught in the Rainmeter tutorial that I just happened to miss?
It is currently April 20th, 2024, 9:44 am
Help: Changing Recycle Bin Icon
-
- Posts: 3
- Joined: May 13th, 2020, 9:37 am
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help: Changing Recycle Bin Icon
No, there is nothing which is an "easy problem". What is easy for one, might be hard for another, so don't worry.ritoshishino wrote: ↑May 15th, 2020, 4:24 am I'm still new to Rainmeter, let alone making my own skin so forgive me if this is an easy problem
You have to add an IfCondition to the RecycleManager measure, which sets the image of the meter representing the icon accordingly to the numberof the files residing into the recycle bin:ritoshishino wrote: ↑May 15th, 2020, 4:24 am I'm making my image launcher for the recycle bin and was wondering how to have its icon change when the bin is full like it would in normal Windows. I tried looking around a little bit to see if anyone has asked this before and was resolved but couldn't find any.
What code do I use?
Code: Select all
[MeasureBinCount]
Measure=RecycleManager
RecycleType=Count
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterBin ImageName "#@#BIN-EMPTY-IMAGE.png"][!UpdateMeter "MeterBin"][!Redraw]
IfFalseAction=[!SetOption MeterBin ImageName "#@#BIN-FULL-IMAGE.png"][!UpdateMeter "MeterBin"][!Redraw]
Code: Select all
[MeterBin]
Meter=Image
-
- Posts: 3
- Joined: May 13th, 2020, 9:37 am
Re: Help: Changing Recycle Bin Icon
Thanks a lot for your helpYou have to add an IfCondition to the RecycleManager measure, which sets the image of the meter representing the icon accordingly to the numberof the files residing into the recycle bin:where [MeterBin] is a simple Image meter, showing the appropriate icon:Code: Select all
[MeasureBinCount] Measure=RecycleManager RecycleType=Count IfCondition=(#CURRENTSECTION#=0) IfTrueAction=[!SetOption MeterBin ImageName "#@#BIN-EMPTY-IMAGE.png"][!UpdateMeter "MeterBin"][!Redraw] IfFalseAction=[!SetOption MeterBin ImageName "#@#BIN-FULL-IMAGE.png"][!UpdateMeter "MeterBin"][!Redraw]
Basically this meter has to have nothing set except its type, because the image is set through the !SetOption bangs of the IFTrueAction and IfFalseAction options of the [MeasureBinCount] measure.Code: Select all
[MeterBin] Meter=Image
So I tried adding in the IfCondition like you suggested, however, after doing so, the launcher doesn't appear on screen anymore
here is my code right now, is there anything missing?
Code: Select all
[Rainmeter]
Update=1000
[MeasureBinCount]
Measure=RecycleManager
RecycleType=Count
IfcCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterBin ImageName "#@#Images\BunnyTrash.png"][!UpdateMeter "MeterBin"][!Redraw]
IfFalseAction=[!SetOption MeterBin ImageName "#@#Images\BunnyTrashFull.png"][!UpdateMeter "MeterBin"][!Redraw]
[MeterBin]
Meter=Image
W=200
H=200
LeftMouseUpAction=[Shell:::{645FF040-5081-101B-9F08-00AA002F954E}]
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help: Changing Recycle Bin Icon
Yep, there is not missing anything, but the IfCondition is miswritten as IfcCondition. Fix this.ritoshishino wrote: ↑May 15th, 2020, 7:47 am So I tried adding in the IfCondition like you suggested, however, after doing so, the launcher doesn't appear on screen anymore
here is my code right now, is there anything missing?
-
- Posts: 3
- Joined: May 13th, 2020, 9:37 am
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Help: Changing Recycle Bin Icon
Ok, I'm glad.