I'm making a proportional/scalable/dynamic skin (hence the variables format) and when I'm trying to set a escaped variable it shows this error on the log:
Formula: "[#Variable]" is unknown: (...)
I made this skin that replicates the error:
It resizes when scrolling on it, the target is to keep the corners proportional while doing it.
Code: Select all
[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1
[Variables]
Size=200
Scale=1
scaleMin=1
scaleMax=5
scaleIncrement=0.5
aspectRatio=(16/9)
Width=([#*Size*]*[#*Scale*])
Height=([#*Width*]/[#*aspectRatio*])
Corners=([#*Width*]*(1/20))
Theme=Theme1
[measureMeter]
measure=String
String=[#Theme]
IfMatch=Theme1
IfMatchAction=[!SetVariable Corners "([#*Width*]*(1/10))"]
DynamicVariables=1
[shapeMeter]
meter=shape
shape=rectangle 0,0,[#Width],[#Height],[#Corners] | strokewidth 0
MouseScrollUpAction=[!SetVariable Scale (Clamp(([#Scale]+[#scaleIncrement]),[#ScaleMin],[#ScaleMax]))][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp(([#Scale]-[#scaleIncrement]),[#ScaleMin],[#ScaleMax]))][!UpdateMeter *][!Redraw]
DynamicVariables=1
So the question is, what is causing this error? To me it has to do with the escaped variable but this is what happens:
(I'm talking about the IfMatchAction)
If you don't escape [#Width] then it stops being dynamic (which means the corners stop being proportional when resizing it).
If you escape it once [#*Width*] then it works fine but shows the error Formula: "[#Width]" is unknown: ([#Width]*(1/10)).
If you escape it twice [#**Width**] then it stops working at all (to me this should be the correct syntax btw).
Before you say, "use Set Option
![Whistle :Whistle](./images/smilies/whistling.gif)
but to answer, yes, this works:
Code: Select all
IfMatchAction=[!SetOption shapeMeter Shape "rectangle 0,0,[#*Width*],[#*Height*],([#*Width*]*(1/10)) | strokewidth 0"]
TIA.