It is currently March 28th, 2024, 9:13 pm

Calc Measure Changing Variable outside of Condition

General topics related to Rainmeter.
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Calc Measure Changing Variable outside of Condition

Post by Vetsus »

i have a couple of these actually doing this. not sure why. i have them disabled at the moment so they don't mess with my skins. currently the variable is set as 50 so would read as:

Code: Select all

Bar_Count=50
However the below calculation is changing the variable to 20 no matter what.

Code: Select all

[BarCount_Calc]
Measure=Calc
Formula=#Bar_Count#
IfCondition=(BarCount_Calc < 20)
IfTrueAction=[!WriteKeyValue Variables Bar_Count "20" "#@#Variables\Visualizer Variables.inc"]
Bekarfel
Posts: 217
Joined: May 16th, 2012, 5:38 am

Re: Calc Measure Changing Variable outside of Condition

Post by Bekarfel »

The first frame BarCount_Calc = 0, therefore BarCount_Calc < 20 = true
moshi wrote:there are many Rainmeter skins that aren't really useful, so let's add another one.
jsmorley wrote:I have good news and bad news.
First the bad news. [...] We would be happy to have this happen and would love to work with anyone who is feeling ambitious.
Now the good news.
I lied, there isn't any good news...
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Re: Calc Measure Changing Variable outside of Condition

Post by Vetsus »

my calculation actually shows 50 for the BarCount_Calc. so i'm not sure where you're coming up with 0. so the calculation says 50, but the if condition is saying if it's less than 20 (which is isn't) then make that value 20, which is for some reason making it 20 in the variables section.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Calc Measure Changing Variable outside of Condition

Post by eclectic-tech »

Vetsus wrote:my calculation actually shows 50 for the BarCount_Calc. so i'm not sure where you're coming up with 0. so the calculation says 50, but the if condition is saying if it's less than 20 (which is isn't) then make that value 20, which is for some reason making it 20 in the variables section.
Are you sure you included the "Visualizer Variable.inc" file in your skin? :uhuh:

Code: Select all

[Variables]
@include=#@#Variables\Visualizer Variables.inc
If that is missing, then the value of Bar_Count is non-existent, and the value of Bar_Count in "Visualizer Variables.inc" file will be changed to 20 when the measure updates...
That is the only way I could duplicate your issue. :x
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Re: Calc Measure Changing Variable outside of Condition

Post by Vetsus »

i have found the issue causing this problem...
Vetsus
Posts: 27
Joined: March 7th, 2017, 5:29 pm

Re: Calc Measure Changing Variable outside of Condition

Post by Vetsus »

i have a separate settings skin for controlling the visualizer and media player variables, it has the measures included in it, but only has the 'Visualizer Variables.inc' file included if you select the visualizer settings. so with that essentially being 'deactivated' from it, the measure sees nothing and corrects it. so i had to create a separate measures inc file for the settings which only needed a single measure for it. and that solved the issue.