I'll use the excuse that I've been up much too long and have not had to do this before.
I want to do this: [!Move #CURRENTCONFIGX# [StackPos:20] "Codger\WiFi"]
StackPos is just a Calc measure that adds the parameter to #CURRENTCONFIGY#
And I have no idea how to reference the parameter inside the measure.
What is the syntax? Also, I can't find it anywhere in the manual. Some examples on the sending end but I can't find any on the receiving. Could you point me to it?
Thanks
It is currently March 28th, 2024, 11:33 pm
Real basic parameter question
-
- Posts: 97
- Joined: May 29th, 2017, 3:16 pm
Real basic parameter question
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Real basic parameter question
Well, I can't imagine what you are trying to accomplish with this, as basing the X position of skin on the screen on the Y position of the skin on the screen doesn't seem... useful, but:
Note that I used the !Move bang in a Calc measure, rather than in an OnRefreshAction in the [Rainmeter] section. This is because variables like #CURRENTCONFIGX# and #CURRENTCONFIGY# must use DynamicVariables=1 in order to get the current value as you drag the skin around on the screen, and [Rainmeter] does not support DynamicVariables.
I use the Counter function in the Calc measure, which is not "reset" when the skin is refreshed, so the move will only happen when the skin is first loaded.
But all that aside, since I have no idea why you would want to do this, the basic answer to your question is:
You reference the value of a Measure by using it as a [SectionVariable], which will just "replace" the [SectionVariable] with the "value" of the measure where it is used. You must use DynamicVariables=1 to ensure that the most current value of the measure is used.
https://docs.rainmeter.net/manual/variables/section-variables/
Not quite sure what you are going for with [StackPos:20] but what that says is "give me the number value of the measure StackPos, with 20 decimal places." There can't be useful decimal places in pixel measurements outside of the Shape meter.
https://docs.rainmeter.net/manual/variables/section-variables/#Decimals
Aside:
Not sure why you are referencing a Calc measure to do this, as:
IfTrueAction=[!Move #CURRENTCONFIGX# (#CURRENTCONFIGY#+20) "Codger\WiFi"]
Would do the same thing, with a lot less hassle and no need for [StackPos] at all.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[MeasureOnLoad]
Measure=Calc
Formula=Counter
IfCondition=MeasureOnLoad <= 1
IfTrueAction=[!Move #CURRENTCONFIGX# [StackPos] "Codger\WiFi"]
DynamicVariables=1
[StackPos]
Measure=Calc
Formula=#CURRENTCONFIGY# + 20
DynamicVariables=1
[MeterOne]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
I use the Counter function in the Calc measure, which is not "reset" when the skin is refreshed, so the move will only happen when the skin is first loaded.
But all that aside, since I have no idea why you would want to do this, the basic answer to your question is:
You reference the value of a Measure by using it as a [SectionVariable], which will just "replace" the [SectionVariable] with the "value" of the measure where it is used. You must use DynamicVariables=1 to ensure that the most current value of the measure is used.
https://docs.rainmeter.net/manual/variables/section-variables/
Not quite sure what you are going for with [StackPos:20] but what that says is "give me the number value of the measure StackPos, with 20 decimal places." There can't be useful decimal places in pixel measurements outside of the Shape meter.
https://docs.rainmeter.net/manual/variables/section-variables/#Decimals
Aside:
Not sure why you are referencing a Calc measure to do this, as:
IfTrueAction=[!Move #CURRENTCONFIGX# (#CURRENTCONFIGY#+20) "Codger\WiFi"]
Would do the same thing, with a lot less hassle and no need for [StackPos] at all.
-
- Posts: 97
- Joined: May 29th, 2017, 3:16 pm
Re: Real basic parameter question
Lots of useful information there about why not to do it the way I want but let's assume I had a sane reason that I simplified down to singular question. And unless I am missing something very fundamental (probably the case) one that didn't get answered.
Can you please fill in the <> parts?
Code: Select all
[blah]
blah blah
blah blah [Routine:20] blah blah
blah blah [Routine:45] blah blah
blah
[Routine]
Measure=Calc
<something here?>
Formula=#avalue#+<some way of referencing passed parameter>
DynamicVariables=1
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Real basic parameter question
There is no such thing as "passed parameters" in Rainmeter. A measure can "go get" the value of some other measure.Codger wrote:Lots of useful information there about why not to do it the way I want but let's assume I had a sane reason that I simplified down to singular question. And unless I am missing something very fundamental (probably the case) one that didn't get answered.Can you please fill in the <> parts?Code: Select all
[blah] blah blah blah blah [Routine:20] blah blah blah blah [Routine:45] blah blah blah [Routine] Measure=Calc <something here?> Formula=#avalue#+<some way of referencing passed parameter> DynamicVariables=1
[MeasureOne]
Measure=Calc
Formula=20
[MeasureTwo]
Measure=Calc
Formula=100 + [MeasureOne]
DynamicVariables=1
-
- Posts: 97
- Joined: May 29th, 2017, 3:16 pm
Re: Real basic parameter question
I was beginning to suspect that. Wrote it another way with 15 tiny calc measures.jsmorley wrote:There is no such thing as "passed parameters" in Rainmeter. A measure can "go get" the value of some other measure.
What are the references to [somemeasure:parameter1,parameter2] in the Section Variables page all about?
Thanks for your time.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Real basic parameter question
That is how you specify more than one of the measure parameters supported by section variables.Codger wrote:What are the references to [somemeasure:parameter1,parameter2] in the Section Variables page all about?
Like telling it you want it scaled by 1024 and with 2 decimal places.
The measure parameters that support multiple parameters are indicated in the docs with Multiple Parameters: in their description.
-
- Posts: 97
- Joined: May 29th, 2017, 3:16 pm
Re: Real basic parameter question
I understand now. Thank you for your patience. I get cranky when I'm stupid,
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Real basic parameter question
I have to say that:
Example:
Is just not needed.
Works fine.
Leads me to believe you are missing some easier way. No way that should be needed.Wrote it another way with 15 tiny calc measures.
Example:
Code: Select all
[MeasurePos]
Measure=Calc
Formula=10+5
[MeterString]
Meter=String
X=[MeasurePos]
DynamicVaribales=1
Code: Select all
[MeterString]
Meter=String
X=(10 + 5)
-
- Posts: 97
- Joined: May 29th, 2017, 3:16 pm
Re: Real basic parameter question
Largely for readability as it is a section that will have to be modified from time to time.
It is the one skin in the suite I am still working on so it might change. That often occurs towards the end - a sudden rampant inspired rewrite.
But currently two bugs left and the suite will be finished. (finger crossed)
It is the one skin in the suite I am still working on so it might change. That often occurs towards the end - a sudden rampant inspired rewrite.
But currently two bugs left and the suite will be finished. (finger crossed)
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Real basic parameter question
Looking good...