I was too tired last night to post the same, but balala is correct... especially when using !SetVariable and escaped variables. For the record, the above will work fine when using a !SetOption instead, see the last paragraph here:
https://docs.rainmeter.net/manual/variables/
This is because, as already described, the value you want to set is a string due to escaping of Width (a string itself), but it's also enclosed between round brackets which alerts Rainmeter that it's a formula where all parts must be resolved to numbers (which is not the case here, obviously). That's why you get the error. By the way, you can workaround this by preceding "([#*Width*]*(1/10))" with a space, like " ([#*Width*]*(1/10))", and not remove any brackets at all, "fooling" Rainmeter into expecting a string and not a formula since an opening round bracket is not the first character in the value you want to set.
One other thing here - although possible, like you already noticed, escaped variables in formulas are not exactly typical in !SetVariable usage, at least not in the codes I wrote. Obviously, this is just personal preference, but I typically use escaping either when defining variables, setting options, or, why not, substitutes. Then, in !SetVariable I just set the variables that are part of such escaped string sequences, letting the escaping / nesting do their job and compute the result according to the individual part I just altered. For example:
https://docs.rainmeter.net/manual/variables/
This is because, as already described, the value you want to set is a string due to escaping of Width (a string itself), but it's also enclosed between round brackets which alerts Rainmeter that it's a formula where all parts must be resolved to numbers (which is not the case here, obviously). That's why you get the error. By the way, you can workaround this by preceding "([#*Width*]*(1/10))" with a space, like " ([#*Width*]*(1/10))", and not remove any brackets at all, "fooling" Rainmeter into expecting a string and not a formula since an opening round bracket is not the first character in the value you want to set.
One other thing here - although possible, like you already noticed, escaped variables in formulas are not exactly typical in !SetVariable usage, at least not in the codes I wrote. Obviously, this is just personal preference, but I typically use escaping either when defining variables, setting options, or, why not, substitutes. Then, in !SetVariable I just set the variables that are part of such escaped string sequences, letting the escaping / nesting do their job and compute the result according to the individual part I just altered. For example:
Code:
[Variables]...widthFactor=(1/20)Corners=([#*Width*]*[#*widthFactor*])...[measureMeter]measure=StringString=[#Theme]IfMatch=Theme1IfMatchAction=[!SetVariable widthFactor (1/10)]DynamicVariables=1
Statistics: Posted by Yincognito — Today, 3:12 pm