It is currently June 25th, 2019, 6:26 am

Inline Options Help

Help with creating, editing & fixing problems with skins
xenium
Posts: 343
Joined: January 4th, 2018, 9:52 pm

Inline Options Help

xenium » March 30th, 2019, 8:41 am

Hi,
I would like to change the font size for the text returned by MeasureCond.

Code: Select all

[MeterTempCond]
Meter=String
MeasureName=MeasureTemp
MeasureName2=MeasureTempSymb
MeasureName3=MeasureCond
.
.
FontSize=35
.
.
Text=%1%2 %3
InlineSetting=Size | 22
InlinePattern=.*.* (.*)
The option . *. * (. *) does not work.

Thanks
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Options Help

balala » March 30th, 2019, 11:17 am

xenium wrote:
March 30th, 2019, 8:41 am
The option . *. * (. *) does not work.
It does for me:
InLine.png
As I don't know how the involved measures are looking, I created three String measures. As probably you figured it out, [MeasureTemp] returns the Temp, [MeasureTempSymb] returns Symb and finally [MeasureCond] returns the Cond string.
As you can see in the attached image, Cond is smaller then the other strings, according to the posted InlineSetting.
You can also try the following InlinePattern: InlinePattern=.* (.*).
If nor this doesn't help, please post the code of the [MeasureTemp], [MeasureTempSymb] and [MeasureCond] measures.
You do not have the required permissions to view the files attached to this post.
xenium
Posts: 343
Joined: January 4th, 2018, 9:52 pm

Re: Inline Options Help

xenium » March 30th, 2019, 12:03 pm

balala wrote:
March 30th, 2019, 11:17 am
It does for me:
InLine.png
As I don't know how the involved measures are looking, I created three String measures. As probably you figured it out, [MeasureTemp] returns the Temp, [MeasureTempSymb] returns Symb and finally [MeasureCond] returns the Cond string.
As you can see in the attached image, Cond is smaller then the other strings, according to the posted InlineSetting.
You can also try the following InlinePattern: InlinePattern=.* (.*).
If nor this doesn't help, please post the code of the [MeasureTemp], [MeasureTempSymb] and [MeasureCond] measures.
For example, the 3 measures display the following text (TempSymb displays "°"):
3 ° Light Rain.
I need to capture all the text displayed after TempSymb.
InlinePattern=.*.* (.*) only reduces "Light"
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inline Options Help

jsmorley » March 30th, 2019, 12:37 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureTemp]
Measure=String
String=3

[MeasureTempSymb]
Measure=String
String=°

[MeasureCond]
Measure=String
String=Light Rain

[MeterTempCond]
Meter=String
MeasureName=MeasureTemp
MeasureName2=MeasureTempSymb
MeasureName3=MeasureCond
FontSize=17
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
InlineSetting=Size | 12
InlinePattern=.*[MeasureTempSymb] (.*)$
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=%1%2 %3

1.png
You do not have the required permissions to view the files attached to this post.
xenium
Posts: 343
Joined: January 4th, 2018, 9:52 pm

Re: Inline Options Help

xenium » March 30th, 2019, 12:43 pm

jsmorley wrote:
March 30th, 2019, 12:37 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureTemp]
Measure=String
String=3

[MeasureTempSymb]
Measure=String
String=°

[MeasureCond]
Measure=String
String=Light Rain

[MeterOne]
Meter=String
MeasureName=MeasureTemp
MeasureName2=MeasureTempSymb
MeasureName3=MeasureCond
FontSize=17
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
InlineSetting=Size | 12
InlinePattern=.*[MeasureTempSymb] (.*)$
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=%1%2 %3


1.png
:17drums
Thank you very much ! :bow:
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inline Options Help

jsmorley » March 30th, 2019, 12:45 pm

Glad to help.
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Options Help

balala » March 30th, 2019, 1:51 pm

xenium wrote:
March 30th, 2019, 12:03 pm
For example, the 3 measures display the following text (TempSymb displays "°"):
3 ° Light Rain.
I need to capture all the text displayed after TempSymb.
InlinePattern=.*.* (.*) only reduces "Light"
Or another possibility: InlinePattern=([MeasureCond]).
The DynamicVariables=1 option is not even needed on the [MeterTempCond] meter.
User avatar
jsmorley
Developer
Posts: 19268
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Inline Options Help

jsmorley » March 30th, 2019, 3:56 pm

Yes balala, your approach is more to the point and simpler in this case.

I based mine on the literal requirement: "I need to capture all the text displayed after TempSymb.".

However...
balala wrote:
March 30th, 2019, 1:51 pm
The DynamicVariables=1 option is not even needed on the [MeterTempCond] meter.
I do not believe this is accurate. DynamicVariables will be required any time a [MeasureName] section variable is used in a meter option. While yes, it will appear to work with my example skin, as the value of the String measures are initially set and never change, it's actually not working, and certainly won't work if the values are coming from WebParser, which always has an initial value of "" (an empty string), and at the very best can only have a value "after" the first update.

Without DynamicVariables=1, the value of the [SectionVariable] in the meter option will never change as the supporting measure value changes, and the InlinePattern will fail as soon as the measure value changes. The value will no longer match on what is actually displayed in the meter.

Here is an example that demonstrates:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureLoop]
Measure=Loop
StartValue=1
EndValue=9

[MeterOne]
Meter=String
MeasureName=MeasureLoop
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
InlineSetting=Size | 20
InlinePattern=([MeasureLoop])
Padding=5,5,5,5
AntiAlias=1
;DynamicVariables=1
Text=The value of the loop is %1 right now
The InlinePattern option will only work when the value of the loop measure is currently "1", which is the first initial value it had. It will fail when the loop measure is at "2" through "9".
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Inline Options Help

balala » March 30th, 2019, 4:45 pm

jsmorley wrote:
March 30th, 2019, 3:56 pm
Yes balala, your approach is more to the point and simpler in this case.

I based mine on the literal requirement: "I need to capture all the text displayed after TempSymb.".
Yep, probably which solution is better, depends on what xenium wants to achieve.
jsmorley wrote:
March 30th, 2019, 3:56 pm
I do not believe this is accurate. DynamicVariables will be required any time a [MeasureName] section variable is used in a meter option. While yes, it will appear to work with my example skin, as the value of the String measures are initially set and never change, it won't work if the values are coming from WebParser, which always has an initial value of "" (an empty string), and at the very best can only have a value "after" the first update.

Without DynamicVariables=1, the value of the [SectionVariable] in the meter option will never change as the supporting measure value changes, and the InlinePattern will fail as soon as the measure value changes. The value will no longer match on what is actually displayed in the meter.
Right. I wrote some static String measures to test the code, forgotting there could be involved some dynamically changing WebParser (or any other type) of measures. In such cases the DynamicVariables=1 is indeed needed. Sorry for my inattention...