I have a calc meter measure doing some math to calculate a value.
[Soft1X]
Measure=Calc
Formula=(#MyRadius#) + ((#MyRadius#) * cos(Radians * 1))
Now I want to use this as the x position value on another meter, but I can not seem to get it to work.
I tried referencing it as Soft1X and I tried referencing it as #Soft1X#. No luck
I have tried not creating a variable but using the following:
!SetVariable Soft01XC Soft1X
the variable never got created.
I tried to dim the variable, but the !SetVariable Soft01XC Soft1X command did not put anything into it. so it remained 0.
I tried:
!set option Img_Soft1 x Soft1X
That didn't work.
How do I reference the contents of the meter measure to use as a x coordinate in another a meter?
It is currently May 2nd, 2024, 6:57 am
Calc Meter
-
- Posts: 13
- Joined: December 22nd, 2012, 6:00 pm
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Calc Meter
Code: Select all
[Soft1X]
Measure=Calc
Formula=(#MyRadius#) + ((#MyRadius#) * cos(Radians * 1))
In any case, assuming that the formula in the MEASURE [Soft1X] is correct, you can use it in a meter to define X with a section variable:
[MeterSample]
Meter=String
X=[Soft1X]
DynamicVariables=1
Side note: It is important to understand the high-level idea of how bangs work. (those are the commands that start with "!" in the manual) They are "actions", and are only executed when "triggered" by some action statement. Examples of that are mouse actions, (LeftMouseUpAction=!SomeBangs) IF actions (IfEqualAction=!SomeBangs) and a few others like OnRefreshAction and FinishAction (you can search the manual for any of these).
I just didn't want you to be confused and think you can just say
!SetVariable SomeVar "SomeValue"
on a line by itself and expect it to do anything. It won't.
-
- Posts: 13
- Joined: December 22nd, 2012, 6:00 pm
Re: Calc Meter
Yes, #MyRadius# is up in variables, and Radians is the name of another (calc) measure. It appears that the calculations for each x and y are working exactly correctly. !! Finally !!
Ah Ha! That is the ticket, worked a charm!
>Side note: It is important to understand the high-level idea of how "bangs" work.
After digging in the other forum posts for some time, I came to that conclusion. Thank you for confirming it.
I really do appreciate your help.
Ah Ha! That is the ticket, worked a charm!
>Side note: It is important to understand the high-level idea of how "bangs" work.
After digging in the other forum posts for some time, I came to that conclusion. Thank you for confirming it.
I really do appreciate your help.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Calc Meter
Glad to help. I sense that you have some experience with programming, which believe it or not can be a bit of a disadvantage when starting out with Rainmeter... You have to be careful not to make too many assumptions based on other languages. Rainmeter is just about exactly not like any of them....
-
- Posts: 13
- Joined: December 22nd, 2012, 6:00 pm
Re: Calc Meter
OMG, tell me about it. I am trying to force myself to not think like I have trained myself to.
I also notice that it doesn't process the page from top to bottom.
I LOVE Rainmeter, and I decided to build what I couldn't find out there, and the stumbling blocks are the simple things.
I also notice that it doesn't process the page from top to bottom.
I LOVE Rainmeter, and I decided to build what I couldn't find out there, and the stumbling blocks are the simple things.