UpdateIcon action doesn't get executed. However if I replace "current.weather[0].icon" with "current.weather(0).icon", it works. I need square braces though. How can I escape them?
spook wrote: ↑September 10th, 2020, 8:05 pm
How can I escape them?
Please pack the whole config with the skin you're talking about and upload the package. I'd like to check, but for this is not enough the posted piece of code.
The problematic skin is Weather.inc. I modified my plugin to use parenthesis, but nevertheless I'm interested on passing braces, because at some point I might not be able to modify the plugin and have to pass braces.
UpdateIcon action doesn't get executed. However if I replace "current.weather[0].icon" with "current.weather(0).icon", it works. I need square braces though. How can I escape them?
Probably not related, but the last parameter in the !SetOption should be enclosed between quotes as well. Try magic quotes (i.e. triple quotes) and see if it helps. You could also temporarily store the parameter as a String measure or a variable to see if it changes things for the better.
Note that this is only going to work in this instance if you DON'T actually have a measure named [0]. If you do, the action will resolve any and all variables in an order that always treats [MeasureName] as a section variable and will produce the value of the measure rather than the literal name.
If you DO have a measure named [0], you will also need to *escape* the section variable:
That will prevent Rainmeter from trying to resolve [0] to a value, and will treat it as a literal.
As long as you don't have an actual measure named [0], the square brackets are a non-issue. The embedded quotes in a parameter of a bang will ALWAYS be an issue, and must be addressed with Magic Quotes.