It is currently March 29th, 2024, 11:27 am

Problems with trash bin. [SOLVED]

Get help with creating, editing & fixing problems with skins
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Problems with trash bin. [SOLVED]

Post by Scalh »

Hi everyone, I'm trying to make a trash bin icon for Honeycomb skin. I've made something like that:

Code: Select all

[Rainmeter]
Update = 0
[MetaData]
Author = Me
Version = 1.0
-------------------Bin measure---------------------
[MeasureBin]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=COUNT

IfEqualValue = 0
IfEqualAction = [!SetOption MeterImage ImageName "#@#Images\bin.png"][!SetOption MeterBinSize FontSize 0][!Redraw][!SetOption MeterImage RightMouseUpAction []]

IfAboveValue = 0
IfAboveAction = [!SetOption MeterImage ImageName "#@#Images\fullbin.png"][!SetOption MeterBinSize FontSize 0][!Redraw][!SetOption MeterImage RightMouseUpAction !CommandMeasure MeasureBin EmptyBin]
-------------------Button meter--------------------
[MeterImage]
Meter=Image
ImageName=#@#Images\bin.png
H=90
LeftMouseUpAction=!CommandMeasure MeasureBin OpenBin
RightMouseUpAction=!CommandMeasure MeasureBin EmptyBin
When trash bin empty, right click won't work. There's no problem here. If you delete something, icon changing but right click still stay unresponsive. When you refresh skin, right click works properly and you can use it for empty the bin. Can you help me please?
Last edited by Scalh on August 24th, 2017, 1:25 am, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problems with trash bin.

Post by balala »

Scalh wrote:When trash bin empty, right click won't work. There's no problem here. If you delete something, icon changing but right click still stay unresponsive. When you refresh skin, right click works properly and you can use it for empty the bin. Can you help me please?
You have to add some quotations in the last !SetOption bangs of the IfEqualAction and IfAboveAction options of the [MeasureBin] measure:

Code: Select all

[MeasureBin]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=COUNT
IfEqualValue=0
IfEqualAction=[!SetOption MeterImage ImageName "#@#Images\bin.png"][!SetOption MeterBinSize FontSize "0"][!SetOption MeterImage RightMouseUpAction ""]
IfAboveValue=0
IfAboveAction=[!SetOption MeterImage ImageName "#@#Images\fullbin.png"][!SetOption MeterBinSize FontSize 0][!SetOption MeterImage RightMouseUpAction "[!CommandMeasure MeasureBin EmptyBin]"]
I also added here some brackets around the !CommandMeasure bang (not absolutely necessary, but adding them proved a good habit, so it's a good thing to get used to use them).
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Re: Problems with trash bin.

Post by Scalh »

balala wrote:You have to add some quotations in the last !SetOption bangs of the IfEqualAction and IfAboveAction options of the [MeasureBin] measure:

Code: Select all

[MeasureBin]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=COUNT
IfEqualValue=0
IfEqualAction=[!SetOption MeterImage ImageName "#@#Images\bin.png"][!SetOption MeterBinSize FontSize "0"][!SetOption MeterImage RightMouseUpAction ""]
IfAboveValue=0
IfAboveAction=[!SetOption MeterImage ImageName "#@#Images\fullbin.png"][!SetOption MeterBinSize FontSize 0][!SetOption MeterImage RightMouseUpAction "[!CommandMeasure MeasureBin EmptyBin]"]
I also added here some brackets around the !CommandMeasure bang (not absolutely necessary, but adding them proved a good habit, so it's a good thing to get used to use them).
Thank you but it's not working as I wanted. You can right click when bin is empty. I'm trying to make it won't give react to right click when it's empty.
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Re: Problems with trash bin.

Post by Scalh »

Okay I did it. I just replaced "" with !Log like that.

[!SetOption MeterImage RightMouseUpAction ""] to [!SetOption MeterImage RightMouseUpAction !Log]

And now, it's working as I wanted. Thanks for your help :)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problems with trash bin.

Post by jsmorley »

If you want to set an action to a "null action" you should use [] not "".
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Re: Problems with trash bin.

Post by Scalh »

jsmorley wrote:If you want to set an action to a "null action" you should use [] not "".
I used it but it causes, I don't know maybe "bug" because when I used it I must to refresh skin every time before emptying the bin. İf I do not refresh, right click stays unresponsive when bin is full.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problems with trash bin. [SOLVED]

Post by balala »

Ok, I'm glad if you got it working as you wanted.
But just one more observation: Update = 0 in the [Rainmeter] section of the initial code has no sense. At least the posted code doesn't require a smaller update value then the default 1000. And even if it would, the lowest possible value of this option is 16 (second paragraph here). Replace the initial Update = 0, with Update=1000.
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Re: Problems with trash bin. [SOLVED]

Post by Scalh »

balala wrote:Ok, I'm glad if you got it working as you wanted.
But just one more observation: Update = 0 in the [Rainmeter] section of the initial code has no sense. At least the posted code doesn't require a smaller update value then the default 1000. And even if it would, the lowest possible value of this option is 16 (second paragraph here). Replace the initial Update = 0, with Update=1000.
Are you sure? Cause when I'm change it to 1000, it's refreshing every 1 second. But, if I change it to 0 I'm getting an instant refresh. So, I think it has sense.

Edit: I've changed it to 16 and now it has lower CPU usage. And there's no difference. Thanks.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Problems with trash bin. [SOLVED]

Post by fonpaolo »

Sorry, but I don't understand the reason why, using "only" once a second to control your trash bin, isn't enough, unless you constantly "play" with it... :confused:

Using updates in your way means that you'll end up with a lot of CPU usage ...wasted.

However, you're free to do all you want, skins and computer are yours. ;-)
Scalh wrote:Edit: I've changed it to 16 and now it has lower CPU usage. And there's no difference. Thanks.
Obviously there's no difference, as balala said, the minimum is 16.
Scalh
Posts: 6
Joined: August 23rd, 2017, 7:53 pm

Re: Problems with trash bin. [SOLVED]

Post by Scalh »

fonpaolo wrote:Sorry, but I don't understand the reason why, using "only" once a second to control your trash bin, isn't enough, unless you constantly "play" with it... :confused:

Using updates in your way means that you'll end up with a lot of CPU usage ...wasted.

However, you're free to do all you want, skins and computer are yours. ;-)


Obviously there's no difference, as balala said, the minimum is 16.
Maybe I want "play" with it :D When I get instant update, it gives me pleasure, you can understand :p