It would be great if #CURRENTSECTION# variable is not resolved in [Variables] section.
Using #CRLF# in [Variables] section can cause issue with inplace tooltip in log in skin tab.
It is currently March 29th, 2024, 11:25 am
[Suggestions & Bug] [Variables] and misc variables
-
- Posts: 154
- Joined: May 14th, 2018, 4:46 pm
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestions & Bug] [Variables] and misc variables
Code: Select all
[Variables]
myVar=#*CURRENTSECTION*#
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestions & Bug] [Variables] and misc variables
I think it is better to do it this way...
When used in a MeterStyle, #CURRENTSECTION# will resolve to the section name the style is used in.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
[Style]
Text=#CURRENTSECTION#
[MeterOne]
Meter=String
MeterStyle=Style
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
[MeterTwo]
Meter=String
MeterStyle=Style
Y=2R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
When used in a MeterStyle, #CURRENTSECTION# will resolve to the section name the style is used in.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 154
- Joined: May 14th, 2018, 4:46 pm
Re: [Suggestions & Bug] [Variables] and misc variables
Maybe I am using it wrong but if I use #myVar# in other section, #CURRENTSECTION# won't be resolved.
Code: Select all
[Variables]
myVar=#*CURRENTSECTION*#
[TextMeter]
Meter=String
Text=#myVar#
;This will show #CURRENTSECTION#, but I want "TextMeter"
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestions & Bug] [Variables] and misc variables
Yeah, I was initially wrong about that. I had edited my post after you saw it... Sorry.oZone wrote: ↑December 7th, 2019, 5:38 pm Maybe I am using it wrong but if I use #myVar# in other section, #CURRENTSECTION# won't be resolved.
Code: Select all
[Variables] myVar=#*CURRENTSECTION*# [TextMeter] Meter=String Text=#myVar# ;This will show #CURRENTSECTION#, but I want "TextMeter"
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestions & Bug] [Variables] and misc variables
I think changing the behavior of #CURRENTSECTION# in [Variables] has backwards compatibility risks that we would not be happy with.
-
- Posts: 154
- Joined: May 14th, 2018, 4:46 pm
Re: [Suggestions & Bug] [Variables] and misc variables
Great thanks for this workaround.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Suggestions & Bug] [Variables] and misc variables
Definitely. Although it might be good, unfortunately can't be done I think, because of the backwards compatibility.
-
- Posts: 134
- Joined: June 30th, 2014, 8:44 am
Re: [Suggestions & Bug] [Variables] and misc variables
This is actually an intended feature, not a bug. And a solution to the problem has already been implemented for a few years.
When you use MyVar = #*CurrentSection*# and then #MyVar#, it resolves to #CurrentSection# literally because the variables can't resolve recursively without using nested variables syntax.
Instead, you would use;
This will resolve to tester because we're using nested variables instead of variables that don't support nesting.
When you use MyVar = #*CurrentSection*# and then #MyVar#, it resolves to #CurrentSection# literally because the variables can't resolve recursively without using nested variables syntax.
Instead, you would use;
Code: Select all
[Variables]
MyVar = [#*CURRENTSECTION*]
[tester]
measure = string
string = [#MyVar]
-
- Posts: 154
- Joined: May 14th, 2018, 4:46 pm
Re: [Suggestions & Bug] [Variables] and misc variables
Thanks for other solution
For bug I mean this
For bug I mean this