It is currently April 26th, 2024, 3:27 am

[Suggestion] ReplaceVariables option in String meter

Report bugs with the Rainmeter application and suggest features.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

[Suggestion] ReplaceVariables option in String meter

Post by death.crafter »

There should be a ReplaceVariables in string meter. When set to 0, the Text option should be rendered as is, without replacing variables.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] ReplaceVariables option in String meter

Post by balala »

death.crafter wrote: February 10th, 2022, 10:16 pm There should be a ReplaceVariables in string meter. When set to 0, the Text option should be rendered as is, without replacing variables.
Since you didn't get a reply over almost two days, let's note that me personally at least, am not sure I can follow you. What do you mean by "without replacing variables"? Do you mean that if in the Text option a variable is added and the ReplaceVariables (or whatever would it be) is set to 0, there should be shown the variables unresolved (so to see for instance #MyVariable# instead of 12, if the MyVariable is set to 12)? Have I understood well your intention?
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: [Suggestion] ReplaceVariables option in String meter

Post by death.crafter »

balala wrote: February 12th, 2022, 7:05 pm Since you didn't get a reply over almost two days, let's note that me personally at least, am not sure I can follow you. What do you mean by "without replacing variables"? Do you mean that if in the Text option a variable is added and the ReplaceVariables (or whatever would it be) is set to 0, there should be shown the variables unresolved (so to see for instance #MyVariable# instead of 12, if the MyVariable is set to 12)? Have I understood well your intention?
Exactly, yes. The same goes for section variables and all.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] ReplaceVariables option in String meter

Post by balala »

death.crafter wrote: February 12th, 2022, 8:58 pm Exactly, yes. The same goes for section variables and all.
Sorry for the late reply. Had a busy day...
For both variables and section variables you can escape them, no need for such a new option. For instance:

Code: Select all

[Variables]
MyVar=12

[MyMeasure]
Measure=Calc
Formula=#MyVar#

[MeterVariables]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=10
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=#*MyVar*#: #MyVar##CRLF#[*MyMeasure:2*]: [MyMeasure:2]
DynamicVariables=1
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: [Suggestion] ReplaceVariables option in String meter

Post by death.crafter »

balala wrote: February 13th, 2022, 6:54 pm Sorry for the late reply. Had a busy day...
For both variables and section variables you can escape them, no need for such a new option. For instance:

Code: Select all

[Variables]
MyVar=12

[MyMeasure]
Measure=Calc
Formula=#MyVar#

[MeterVariables]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=10
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=#*MyVar*#: #MyVar##CRLF#[*MyMeasure:2*]: [MyMeasure:2]
DynamicVariables=1
Right, you can. And the issue was on my end. I was doing a !SetOption and the value was getting replaced. Ofc it's not the fault of string meter.

Well, wouldn't hurt to have that option, but yeah, I am not concerned with it anymore. Thank you for responding tho.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] ReplaceVariables option in String meter

Post by balala »

death.crafter wrote: February 13th, 2022, 7:07 pm Right, you can. And the issue was on my end. I was doing a !SetOption and the value was getting replaced. Ofc it's not the fault of string meter.

Well, wouldn't hurt to have that option, but yeah, I am not concerned with it anymore. Thank you for responding tho.
Yep, let's see what the devs believe about this question, however I think the number of possible options should be kept as low as possible. However I'm not sure the suggested possibility wouldn't be useful in some cases. So, let's see if the devs will consider this as a priority.