It is currently September 8th, 2024, 12:00 am

Nested Conditions + Formulas

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

Re: Nested Conditions + Formulas

Post by sl23 »

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?
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

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?
Any help please? :) :thumbup:
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

Managed to solve it.
Thanks for your help! :Whistle
57686174 77696C6C 6265 77696C6C 6265
User avatar
balala
Rainmeter Sage
Posts: 16499
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nested Conditions + Formulas

Post by balala »

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]
; NET download
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.
User avatar
sl23
Posts: 1600
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Nested Conditions + Formulas

Post by sl23 »

Thanks balala :thumbup:
I knew about it already, it's not in my code, it was added to inform anyone helping. :D
57686174 77696C6C 6265 77696C6C 6265
User avatar
balala
Rainmeter Sage
Posts: 16499
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Nested Conditions + Formulas

Post by balala »

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

Re: Nested Conditions + Formulas

Post by sl23 »

:thumbup:
57686174 77696C6C 6265 77696C6C 6265