nek wrote: ↑August 19th, 2020, 10:27 pm
I expected that the red drop shadow move to right, but nothing happened.
InlineSetting=Size | (32+#VAR#) worked, but
InlineSetting=Shadow | (2+#VAR#) | 0 | 0 | FF0000FF did't work.
Your expectation was correct, but you missed something in the implementation: adding the appropriate InlineSetting to the resized meter (i.e.
[MeterString2]). In other words, the code you have now pointlessly sets the shadow based on #VAR# in the 1st meter, but the 2nd meter is only getting its size changed and no shadow modification. This is the correct way to do it:
Code: Select all
[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1
MouseScrollDownAction=[!SetVariable VAR "(Clamp([#VAR]-2,0,40))"][!UpdateMeter *][!Redraw]
MouseScrollUpAction=[!SetVariable VAR "(Clamp([#VAR]+2,0,40))"][!UpdateMeter *][!Redraw]
[Variables]
VAR=0
[MetertString1]
Meter=String
Text=Onett
X=0
Y=0
Antialias=1
DynamicVariables=1
Padding=10,0,10,0
SolidColor=95B9C7FF
FontSize=32
;Shadow | X Offset | Y Offset | Blur Amount | Color
InlineSetting=Shadow | 2 | 0 | 0 | FF0000FF
[MeterString2]
Meter=String
Text=Onett
X=0r
Y=0R
Antialias=1
DynamicVariables=1
Padding=10,0,10,0
SolidColor=87AFC7FF
FontSize=32
;Size | numeric point size
InlineSetting=Size | (32+#VAR#)
;Shadow | X Offset | Y Offset | Blur Amount | Color
InlineSetting2=Shadow | (2+#VAR#) | 0 | 0 | FF0000FF
Preview:
InlineSetting Dynamic Shadow.jpg
Notice the InlineSetting2 option. I removed #VAR# from the 1st meter InlineSetting, since as I mentioned, it made no sense as that meter was static (i.e. didn't suffered size modifications like the 2nd).
EDIT: Actually, simply
InlineSetting2=Shadow | 2 | 0 | 0 | FF0000FF also works, after all you probably don't need to modify the extent of the shadow anyway. Other than that, generally, inline settings should be used when you need the desired effects on just a part of the string - if you need them on the whole string and you're fine with a 1 pixel shadow, you might as well get rid of the inline settings altogether and just use instead:
Code: Select all
FontSize=(32+#VAR#)
StringEffect=Shadow
FontEffectColor=FF0000FF
Basically, unless some tweaking of the desired effects are needed on the whole string, InlineSettings make the most sense when used in combo with InlinePattern, to designate the part of the string you want to be "different" from the rest.
EDIT2: It would be better to move the mouse actions under the
[MeterString2] meter, because: a) the action is, after all, performed on that meter and b) the
[Rainmeter] section (where you now have those mouse actions) doesn't support dynamic variables (which you do use). Also,
Update=-1, while useful when the idea is to save CPU usage on heavyweight skins, causes variables to not be updated properly in the Rainmeter Log; while this isn't a deal breaker, it may be useful when debugging your skin.
You do not have the required permissions to view the files attached to this post.