It is currently March 28th, 2024, 10:31 pm

[Solved] Recycle bin click actions not working

Get help with creating, editing & fixing problems with skins
Zibob
Posts: 9
Joined: September 17th, 2012, 10:37 pm

[Solved] Recycle bin click actions not working

Post by Zibob »

I have been in the process of making a skin set for my own use (but you can have it if you like) and I am nearly finished. That being said I have been nearly finished for 2 weeks now. I have 3 skins left and 2 I know I can do easy. The third is the problem.

The recycle bin is the only one giving me trouble. I have the basic layout finished and some of it working. The part that is not working is icons. I would like to have it so that when files are in the recycle bin the full icon shows and when it's empty it the empty icon shows. The crowning jewel would be to click the bin to empty it when it's full. The problem is it does not work fully.

It knows when the bin is full and empty it displays the appropriate icon but the mouse clicks don't work. I already have a skin from another person that does this. I have tried doing it their way and it won't work and I have tried rewriting it following the instructions in the Rainmeter help section. This too did nothing to fix the problem. I am at a loss as to what the problem is.

Just to see here is the offending code:

Code: Select all

[Bin Icon Actions Calculations]
Measure=Calc
Formula=Measure Bin Items
IfAboveAction=!execute [!RainmeterHideMeter Icon Empty][!
RainmeterShowMeter Icon Full]
IfAboveValue=0
IfEqualAction=!execute [!RainmeterHideMeter Icon Full][!
RainmeterShowMeter Icon Empty]
IfEqualValue=0

[Icon Empty]
Meter=Image
ImageName=#SkinsPath#\NewSkin\Shared\Recycle Bin Empty Icon.png
X=5
Y=20
W=45
H=60
AntiAlias=1

[Icon Full]
Meter=Image
ImageName=#SkinsPath#\NewSkin\Shared\Recycle Bin Full Icon.png
X=5
Y=20
W=45
H=60
AntiAlias=1
LeftMouseUpAction=!CommandMeasure "Measure Bin Items" "EmptyBin"
RightMouseUpAction=!CommandMeasure "Measure Bin Items" "OpenBin"
ToolTipText="Left click to empty#CRLF#Right click to open"
It's rough and will be cleaned up for the final do over. I am just trying to get it working first. Any help would be much appreciated.
Last edited by Zibob on September 25th, 2012, 12:39 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin click actions not working

Post by jsmorley »

Try to stay away from spaces in [SectionNames]. There is no need for them, just use "camel case" like [IconFull] / [IconEmpty].

Now, having said that, what is happening is that the action option:

IfAboveAction=!execute [!RainmeterHideMeter Icon Empty][!RainmeterShowMeter Icon Full]

Is trying to hide a meter called "Icon" in a config called "Empty", since you have not enclosed the section name with spaces in quotes and so it sees the two words as separate things.

IfAboveAction=[!HideMeter "Icon Empty"][!ShowMeter "Icon Full"]

Also corrected some old deprecated syntax. Don't need !Execute or the "Rainmeter" prefix in bangs anymore.

Oh, did I mention "Try to stay away from spaces in [SectionNames]"? :-) Having them is just going to cause issues like this over and over unless you are just terribly careful and alert at all times. It's not worth it.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Recycle bin click actions not working

Post by MerlinTheRed »

Why not just say "spaces in section names are not allowed"? ;) Perhaps someone could someday write a little about naming sections and variables in Rainmeter skins (if there isn't something about this in the tutorials already).
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin click actions not working

Post by jsmorley »

MerlinTheRed wrote:Why not just say "spaces in section names are not allowed"? ;) Perhaps someone could someday write a little about naming sections and variables in Rainmeter skins (if there isn't something about this in the tutorials already).
I am always hesitant to "you can't" when, as in this case, the .ini format and Rainmeter both actually do allow spaces in section names. It's just a bad habit to get into as you have to then be really careful when you refer to them in bangs or Lua etc.

We are currently working on a complete reboot of the online documentation, I will make sure that we at least suggest these kinds of conventions that make sense.
Zibob
Posts: 9
Joined: September 17th, 2012, 10:37 pm

Re: Recycle bin click actions not working

Post by Zibob »

Okay thank you very much. I will give it a go and see what happens. Thanks for the tip on spaces. I had a feeling but it had worked up to a point guess I just reached breaking. I have done a little programming before and I was aware of the [Space Are Bad] rule, just was not sure to what capacity it applies in the Rainmeter setup. I will change it.

Thank you again. I will report back with results.
Zibob
Posts: 9
Joined: September 17th, 2012, 10:37 pm

Re: Recycle bin click actions not working

Post by Zibob »

Thank you very much it works perfectly now. On CamelCase note, are underscores (_) okay?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin click actions not working

Post by jsmorley »

Zibob wrote:Thank you very much it works perfectly now. On CamelCase note, are underscores (_) okay?
Absolutely.
Zibob
Posts: 9
Joined: September 17th, 2012, 10:37 pm

Re: Recycle bin click actions not working

Post by Zibob »

Sweet thank you very much everything is now working beautifully and with that my skins are finished. Thank you for the help with name spaces also.

On a side note where would one find an advanced copy of the rulebook on creating Rainmeter skins. The one on the website is good but lacks explanation of all the little tweaks and options that can be applied to meters, bars, images ans so on. Actually a better question would be does one exist?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Recycle bin click actions not working

Post by jsmorley »

Zibob wrote:Sweet thank you very much everything is now working beautifully and with that my skins are finished. Thank you for the help with name spaces also.

On a side note where would one find an advanced copy of the rulebook on creating Rainmeter skins. The one on the website is good but lacks explanation of all the little tweaks and options that can be applied to meters, bars, images ans so on. Actually a better question would be does one exist?
Glad to help. As to the documentation, the online manual at: http://rainmeter.net/cms/Manual_beta is the best that is available. While it is far from perfect, and can be a tad hard to find things in, (we are working on that) it is in fact pretty "complete" and has every option available described.

Granted, there are some clever way folks have found to use the options, sometimes in ways we never envisioned, to achieve some particular result. Some of that I'm afraid is just "tribal knowledge", although if you search and scan around here on the forums, there is a wealth of information. Also, don't be shy about asking for help. The community is pretty happy to give advice or share tips.
Zibob
Posts: 9
Joined: September 17th, 2012, 10:37 pm

Re: [Solved] Recycle bin click actions not working

Post by Zibob »

Okay thank you. I was thinking I would just read until I got stuck and then get in here. Rather than bug you guys all the time. With this skin finished I will have to make a new one. This one works but I am not sure if I like it as much as I thought I would. So I will be back with questions and nagging broken things again soon.