ronzino wrote: ↑January 12th, 2022, 1:08 am
I have a vertical bar meter (i.e. it expands-reduces on Y axis) and I would like to modify its width according to a dynamic measure.
But it seems not to work (code example follows). I am sure (but not tried yet) that a workaround should be using rectangle shape...
Here are some examples using an image meter (top), followed by a shape meter, and 2 bar meters.
eclectic-tech wrote: ↑January 12th, 2022, 2:38 am
Here are some examples using an image meter (top), followed by a shape meter, and 2 bar meters.
thanks for your answer, but probably my question was not so clear. let me explain better.
let's speak about the case of Bar meter. The extension of a bar meter is driven by "MeasureName" and its movement direction is defined by "BarOrientation".
Now let's say that i want a vertical bar so BarOrientation=Vertical and MeasureName=A.
The vertical expansion and contraction is driven by A value.
IN THE MEANWHILE, I would like to drive the width of the Bar meter with another value lets say B. Doing so the implementation of Bar meter will make automatically the movment vertically (Y axis), and I will drive width with B.
BUT it seems to me that is not allowed by rain meter to dynamically change the width of a bar meter (when of course the choosen BarOrientation=Vertical). I other words, if rainmeter drives the BarOrientation=vertical (Y axis enlargement) i am not allowed to modify the width even if it is not touched by the automatic movment implementation.
Last edited by balala on January 12th, 2022, 11:35 am, edited 1 time in total.
Reason:Please use <code> tags whenever are posting code snippets. It's the </> button.
balala wrote: ↑January 12th, 2022, 11:38 am
Try to use the string value of the [dbgBarW_Calc] measure in the W option, replacing the W=dbgBarW_Calc option by W=[dbgBarW_Calc]
Yes. That is a section variable. Each measure is essentially a section. That is why I mentioned the manual. You could do what you are trying more than one way and have it be good. Such as using a variable in this form; #VarImg#, then declare that static variable without the # in the [Variables] section, likea dis: VarImg=[dbgBarW_Calc]. I am just illustrating the possible variations - this case using the the character variable #VarImg# is less intuitive than using the section variable [dbgBarW_Calc].
Hope you get it but if you'd prefer to stay on task, balala's suggestion should work for you.
Thanks for clarifying. This will work; because you want the Image and Shape meters to increase vertically (like the Bar meter) some calculations need to be added to the meter's width and height values.
eclectic-tech wrote: ↑January 12th, 2022, 4:19 pm
Thanks for clarifying. This will work; because you want the Image and Shape meters to increase vertically (like the Bar meter) some calculations need to be added to the meter's width and height values.
barx3.gif
Thanks for your help I have tried and, resuming, the result (and my fault) is this one..... in the Bar meter, for W i have used dbgBarW_Calc INSTEAD of [dbgBarW_Calc] (see my first post)
NOW..... can someone enlight me why dbgBarW_Calc is a numeric value, while [dbgBarW_Calc] is the string one, and i Have to use a string value to set W in the bar meter ? S
shouldn't W be numeric in the bar meter ? It defines the width !!!
furthermore, lets look at eclectic-tech suggestion to do this
W=(100-[dbgBarW_Calc:])
here we are subtracting a string from a number (i.e. casting) casting back to assign the numeric value to W that for sure it shall be used as numeric.
Is there something I haven't understood?
Honestrly speaking is quit confusing the double value (string and numeric) managment that almost always does not trigger any error in the log like in this case.
This may help to explains about Measure values. All measures return both String and Number values.
When used in MeasureName= in a String Meter, the String value will be used by default.
When a measure name is used in calculations (e.g., Calc 'Formula' or 'IfCondition' tests) the Number value will be used by default.
You can specify which measure value to use by using the measure name as a Section Variable. Using Section Variables lets you control whether the String or Number value is used.
Yeah, it can take a bit of time to understand, but eventually you will come to appreciate the control Section Variables provide.
Remember to always add DynamicVariables=1 in any section with Section Variables in it.