It is currently April 16th, 2024, 12:07 pm

Recycle bin

Get help with creating, editing & fixing problems with skins
Ace_323
Posts: 19
Joined: February 7th, 2018, 12:14 am

Re: Recycle bin

Post by Ace_323 »

there is a bit of delay between our msgs
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin

Post by jsmorley »

Ace_323 wrote:there is a bit of delay between our msgs
Passing like ships in the night... ;-)
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin

Post by jsmorley »

P.S. [!Redraw] in and of itself does nothing useful... What you want is [!UpdateMeter MeterBin][!Redraw].

What !Redraw does is "redraw the skin with the current state of all meters". While you have used !SetOption to change the ImageName option of MeterBin, the meter has not been "updated" to apply the change made to the option. So first update the meter, then redraw the skin...

https://docs.rainmeter.net/manual/bangs/#Redraw
Ace_323
Posts: 19
Joined: February 7th, 2018, 12:14 am

Re: Recycle bin

Post by Ace_323 »

so how would you have done it?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin

Post by jsmorley »

Ace_323 wrote:so how would you have done it?

Code: Select all

[Rainmeter]
Update=1000

[MeasureBin]
Measure=RecycleManager
RecycleType=Count
IfCondition=MeasureBin = 0
IfTrueAction=[!SetOption MeterBin ImageName "#@#Images\recyclebin.png"][!UpdateMeter MeterBin][!Redraw]
IfFalseAction=[!SetOption MeterBin ImageName "#@#Images\recyclebinfull.png"][!UpdateMeter MeterBin][!Redraw]

[MeterBin]
Meter=Image
W=90
H=90
LeftMouseUpAction=[!CommandMeasure MeasureBin "OpenBin"]
RightMouseUpAction=[!CommandMeasure MeasureBin "EmptyBin"]
You were very, very close to exactly what I would have done. Good start.
Ace_323
Posts: 19
Joined: February 7th, 2018, 12:14 am

Re: Recycle bin

Post by Ace_323 »

Ok thank you for the tips