Page 3 of 4

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:08 pm
by balala
Yincognito wrote: March 1st, 2020, 8:05 pm it just can't parse the UpdateDivider line because of a previous non Key=Value line.
Not sure this is (or why is it) normal. But it seems it indeed is...

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:12 pm
by jsmorley
Yes, if you do this:

Code: Select all

[MeasureOne]
Measure=Calc
Formula=(MeasureOne + 1) % 10
[!Log "Hello"][!Log "Goodbye"]
UpdateDivider=-1
Then the invalid line with just the two "actions" and no "option" breaks the parser for this measure, it is entirely invalid INI format, much less Rainmeter, and the UpdateDivider=-1 is never read. Don't do that...

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:15 pm
by Yincognito
balala wrote: March 1st, 2020, 8:08 pm Not sure this is (or why is it) normal. But it seems it indeed is...
After further thinking, I think it has to do with how Rainmeter parses code (i.e. looking for [Sections]). When it encounters the faulty line, it assumes the current section (i.e. [SomeTest]) has ended, and the following lines until a new [Section] begins are to be ignored as "comments".

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:16 pm
by jsmorley
Yincognito wrote: March 1st, 2020, 8:15 pm After further thinking, I think it has to do with how Rainmeter parses code (i.e. looking for [Sections]). When it encounters the faulty line, it assumes the current section (i.e. [SomeTest]) has ended, and the following lines until a new [Section] begins are to be ignored as "comments".
Almost correct. It sees the [Action] without any option as an entirely new [SectionName]. Since there is no Measure= or Meter= "type" on it, it will be treated as a MeterStyle.

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:18 pm
by Yincognito
jsmorley wrote: March 1st, 2020, 8:16 pm Correct. It sees the [Action] without any option as an entirely new [SectionName]
Yes. Forgot the bangs have the same [syntax] as [sections] (i.e. enclosed in square brackets).

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:19 pm
by jsmorley
Yincognito wrote: March 1st, 2020, 8:18 pm Yes. Forgot the bangs have the same [syntax] as [sections] (i.e. enclosed in square brackets).
Yes. He has inadvertently created a MeterStyle.

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:22 pm
by Yincognito
jsmorley wrote: March 1st, 2020, 8:19 pm Yes. He has inadvertently created a MeterStyle.
Indeed.

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:23 pm
by jsmorley

Code: Select all

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

[MeasureOne]
Measure=Calc
Formula=(MeasureOne + 1) %11
[!Log "Hello"]
FontSize=30

[MeterOne]
Meter=String
MeterStyle=!Log "Hello"
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:27 pm
by balala
jsmorley wrote: March 1st, 2020, 8:16 pm Almost correct. It sees the [Action] without any option as an entirely new [SectionName]. Since there is no Measure= or Meter= "type" on it, it will be treated as a MeterStyle.
Stupid me. Didn't figure this out, but it's perfectly logic and explains what is going on.

Re: Some issues with !Refresh

Posted: March 1st, 2020, 8:30 pm
by Yincognito
balala wrote: March 1st, 2020, 8:27 pm Stupid me. Didn't figure this out, but it's perfectly logic and explains what is going on.
Nah, don't worry. Neither of us truly figured this out since the first post. That's why some are actual developers and others are ... erm ... trying very hard to be (yeah, myself included - although I have no clue what I'm trying to "develop" here). :lol: