Calc Measure Changing Variable outside of Condition

General topics related to Rainmeter.

Calc Measure Changing Variable outside of Condition

August 10th, 2017, 5:09 pm
Vetsus
   [16 posts]

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"]

Re: Calc Measure Changing Variable outside of Condition

August 11th, 2017, 12:55 am
Bekarfel
   [186 posts]

The first frame BarCount_Calc = 0, therefore BarCount_Calc < 20 = true

Re: Calc Measure Changing Variable outside of Condition

August 11th, 2017, 6:04 pm
Vetsus
   [16 posts]

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

Re: Calc Measure Changing Variable outside of Condition

August 11th, 2017, 7:54 pm
eclectic-tech
Rainmeter Sage   [2227 posts]

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

Re: Calc Measure Changing Variable outside of Condition

August 11th, 2017, 9:30 pm
Vetsus
   [16 posts]

i have found the issue causing this problem...

Re: Calc Measure Changing Variable outside of Condition

August 11th, 2017, 9:35 pm
Vetsus
   [16 posts]

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.

Return to “General Discussion”



Who is online

Users browsing this forum: No registered users and 2 guests