It is currently August 13th, 2024, 8:14 am

Nested Conditions + Formulas

Get help with creating, editing & fixing problems with skins
sl23
Posts: 1489
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Bit confused with this as when I set DL measure to UseBits=1 it shows the same value in the Log, is that right?

I've also looked at the illustro skin and added the same formula for the Bar that my old working skin has, MaxValue=(#DownSpeed# * 1048576), yet that Bar only shows around 5%? Why is that?
- MuLab -
sl23
Posts: 1489
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

This is my formula: ([&m[#CURRENTSECTION]:]/((#DownSpeed# * (1024**2))/8)*(#BarH#))
Downspeed=30.00

From what I can work out:
((CurrentValue/MaxValue)*BarH)
Should give the correct value for a Bar/Shape meter, yes?
But for some reason this doesn't work.

This MaxValue=(30 * 1048576) gives the text value correctly and so surely it is required in the Bar/Shape formula? But I can't add it as it won't work. I either get no Bar or a Bar that is about 4/5 times too big!

So going by the above formula which works elsewhere, I should do this:
((CurrentValue/(30 * 1048576))*BarH)
Which equates to:
((3689100/31457280)*45) Which gives a completely incorrect result!

So, I'm assuming this number is in MB not Mb so I need to divide by 8? I get this: 3932160
Meaning I have to do this equation:
((CurrentValue/((30 * 1048576)/8))*BarH)
Or:
((3689100/((30 * 1048576)/8))*45)
But I still only get 52.xxx%. But the download speed is around 94/5% So what do I need to do here?
- MuLab -
sl23
Posts: 1489
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Managed to solve it.
Thanks for your help!
- MuLab -
balala
Rainmeter Sage
Posts: 16449
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nested Conditions + Formulas

sl23 wrote: July 24th, 2024, 2:22 pm Managed to solve it.
Just as a side note, you should know that in Rainmeter, unlike in programming languages (what Rainmeter is not!), the comments have to be added in distinct lines, not to the end of existing lines. This means that for instance a [4Stat] ; NET download meter name is not correct (even if any times Rainmeter get this working), because it should look this way:

Code: Select all

[4Stat]
Note the comment (; NET download in this case) added to a new line. In Rainmeter the semicolon (;) states a comment, ONLY if it is the first character of a line, otherwise what follows it is not ignored and sooner or later definitely will cause you troubles. Just to let you understand see that there are some options (TransformationMatrix for example) which by default contain semicolons, so these semicolons don't set a comment.
A few details here.
sl23
Posts: 1489
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Thanks balala
I knew about it already, it's not in my code, it was added to inform anyone helping.
- MuLab -
balala
Rainmeter Sage
Posts: 16449
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nested Conditions + Formulas

sl23 wrote: July 24th, 2024, 3:52 pm Thanks balala
I knew about it already, it's not in my code, it was added to inform anyone helping.
Alright, you know, but even in such a case you should add them to new lines.
sl23
Posts: 1489
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

- MuLab -