Hello,
I'm new to Rainmeter and I'm trying to find a way to switch my recycle bin honeycomb skin icon between the full and empty images. I tried to look up as many options in the forum already but nothing worked. I'm using this code I found online for my bin and it works just fine but simply wouldn't alternated between empty and full. Both my images are in the resources. Here's my code:
AlienLP wrote: ↑December 19th, 2019, 7:54 pm
I'm using this code I found online for my bin and it works just fine but simply wouldn't alternated between empty and full.
First replace the IfCondition option of the [MeasureBin] measure with IfCondition=(MeasureBin=0) because you can't use the Count function (parameter, whatever) into IfCondition, just in RecycleType option. In an IfCondition you have to use the measure or variable which you wanna check.
Beside this:
An IfActionTrue and IfActionFalse options don't exist. They are IfTrueAction, respectively IfFalseAction. Replace them accordingly. If using IfActionTrue and IfActionFalse no wonder they don't work, because Rainmeter doesn't recognize them.
More of the bangs used into the above two options are not correctly used. For instance not sure what was your intention with the last bangs of both options ([!SetOption MeterImage RightMouseUpAction !Log] and [!SetOption MeterImage RightMouseUpAction [!CommandMeasure MeasureBin EmptyBin]]), but I suppose you want to set some actions for the RightMouseUpAction option of the [MeterImage] meter, right? If so, an important thing you have to take into account is that especially if the parameter you wanna set contains spaces, quotations are absolutely needed, otherwise the parameter won't be properly set. So the above two bangs should be: [!SetOption MeterImage RightMouseUpAction "!Log"] and [!SetOption MeterImage RightMouseUpAction "[!CommandMeasure MeasureBin EmptyBin]"] (however still can't say what is your intention with [!SetOption MeterImage RightMouseUpAction "!Log"], because the !Log bang requires at least one parameter, the string you want to show in log).
Don't set the font size of a string meter to 0. Doesn't make sense. You have to use a "normal" size. Bellow I set 10 in both options, but I'm not sure what value do you want to set, so modify the values accordingly.
Although not absolutely necessary, is it a very good idea to update the meters which you modify through some !SetOption bangs, so you should add a [!UpdateMeter "MeterImage"] and a [!UpdateMeter "MeterBinSize"] bangs to both options, besides the existing [!Redraw].
Taking into account the above, the two options should be:
balala wrote: ↑December 19th, 2019, 8:48 pm
First replace the IfCondition option of the [MeasureBin] measure with IfCondition=(MeasureBin=0) because you can't use the Count function (parameter, whatever) into IfCondition, just in RecycleType option. In an IfCondition you have to use the measure or variable which you wanna check.
Beside this:
An IfActionTrue and IfActionFalse options don't exist. They are IfTrueAction, respectively IfFalseAction. Replace them accordingly. If using IfActionTrue and IfActionFalse no wonder they don't work, because Rainmeter doesn't recognize them.
More of the bangs used into the above two options are not correctly used. For instance not sure what was your intention with the last bangs of both options ([!SetOption MeterImage RightMouseUpAction !Log] and [!SetOption MeterImage RightMouseUpAction [!CommandMeasure MeasureBin EmptyBin]]), but I suppose you want to set some actions for the RightMouseUpAction option of the [MeterImage] meter, right? If so, an important thing you have to take into account is that especially if the parameter you wanna set contains spaces, quotations are absolutely needed, otherwise the parameter won't be properly set. So the above two bangs should be: [!SetOption MeterImage RightMouseUpAction "!Log"] and [!SetOption MeterImage RightMouseUpAction "[!CommandMeasure MeasureBin EmptyBin]"] (however still can't say what is your intention with [!SetOption MeterImage RightMouseUpAction "!Log"], because the !Log bang requires at least one parameter, the string you want to show in log).
Don't set the font size of a string meter to 0. Doesn't make sense. You have to use a "normal" size. Bellow I set 10 in both options, but I'm not sure what value do you want to set, so modify the values accordingly.
Although not absolutely necessary, is it a very good idea to update the meters which you modify through some !SetOption bangs, so you should add a [!UpdateMeter "MeterImage"] and a [!UpdateMeter "MeterBinSize"] bangs to both options, besides the existing [!Redraw].
Taking into account the above, the two options should be:
Thank you so much for helping! I honestly don't know much about coding. I have no idea what the !Log is for and why it is included there by the author. I just simply wanted a functional bin with Honeycomb. I tried replacing it with your guidance and your code but it still won't alternated between empty and full image unfortunately. I want my to be able to OpenBin on left click and EmptyBin on right click and also be able to see a full bin image when there's a file in it. That's it. Sorry, if i'm repeating myself . If you could come up with a code that I can just copy and paste and make all of that work that would be super!
AlienLP wrote: ↑December 19th, 2019, 9:16 pm
Sorry, if i'm repeating myself . If you could come up with a code that I can just copy and paste and make all of that work that would be super!
Don't worry, you're not repeating yourself at all. The following code works only if in the @Resources\Images folder the BinE.png and BinF.png images exist:
balala wrote: ↑December 19th, 2019, 9:41 pm
Don't worry, you're not repeating yourself at all. The following code works only if in the @Resources\Images folder the BinE.png and BinF.png images exist:
AlienLP wrote: ↑December 19th, 2019, 9:47 pm
I just needed to add ImageName=#@#Images\BinE.png to your code!
You mean to the [MeterImage] meter? Not needed, because the name of the image is set by the !SetOption bangs of the IftrueAction and IfFalseAction options of the [MeasureBin] measure.
I'm glad if you got it working as wanted.
balala wrote: ↑December 19th, 2019, 9:56 pm
You mean to the [MeterImage] meter? Not needed, because the name of the image is set by the !SetOption bangs of the IftrueAction and IfFalseAction options of the [MeasureBin] measure.
I'm glad if you got it working as wanted.
Yep, I don't know why but the icon won't appeared unless I added that . Oh I'm also curious if there's a coding line that can possibly allowed me to drag and drop a file on the bin icon like the normal Recycle Bin?
AlienLP wrote: ↑December 19th, 2019, 10:00 pm
Oh I'm also curious if there's a coding line that can possibly allowed me to drag and drop a file on the bin icon like the normal Recycle Bin?
Not simply. Don't recommend, especially if you're a beginner.
AlienLP wrote: ↑December 19th, 2019, 10:22 pm
Alright then, thanks for your help anyways Have a great day!
Well, in fact it's not completely impossible, a while ago a plugin having such purposes has been posted, being developed by theAzack9.
I'm not currently using this plugin, so even if I tried it out once, I'm not sure I can help you with this. But if interested, for sure here on the forum someone will help you to get it properly working.