It is currently September 21st, 2021, 4:30 pm

[BUG?]Escaping nested variables doesn't work

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

Re: [BUG?]Escaping nested variables doesn't work

Post by death.crafter »

Brian wrote: June 13th, 2021, 5:38 am This really has to do with how many times the variables are parsed when being replaced in multiple locations than it does with "multiple escapes".

Each time a variable is parsed, if it encounters an asterisk directly after the variable "type" character AND just before the ending variable token, it tells Rainmeter to not resolve the variable, but it then removes those asterisks since it assumes the next time the variable is used is when you really want to replace the variable with its value. I hope that makes sense.
  • Here is what is written to the ini file: OnRefreshAction=[!Log [#**Message**]]
  • Here is what the log shows: [#*Message*]

    Not using the variable as a bang replacement, the variable is only parsed once, which when the bang is executed (RightMouseUpAction) - resulting in a double escape sequence.

Hopefully that makes things a little clearer. We will discuss any changes to the docs to make things more understandable, although to be clear, this only happens when using a variable as a bang replacement.

Yes, exactly! I thought if the compiler(if you can call it that) removes one asterisk every time it parses the string then adding one asterisk for each parsing would give me the desired result. Though multiple escaping may not be the perfect term for it 😄
from the Realm of Death
My Current Desktop