In this case, we are using Extend so we can "shorten" the amount of stuff we have to change in order to have our color change on MouseOverAction / MouseLeaveAction. Instead of having to use !SetOption and re-define the entire shape definition to change the color, we can just change the value of the option "MyColor".
The alternative would be:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
Red=255,0,0,255
Green=0,255,0,255
[MeterShape1]
Meter=Shape
Shape=Line 5,5,200,5 | StrokeWidth 10 | Stroke Color #Red#
MouseOverAction=[!SetOption MeterShape1 Shape "Line 5,5,200,5 | StrokeWidth 10 | Stroke Color #Green#"][!UpdateMeter MeterShape1][!Redraw]
MouseLeaveAction=[!SetOption MeterShape1 Shape "Line 5,5,200,5 | StrokeWidth 10 | Stroke Color #Red#"][!UpdateMeter MeterShape1][!Redraw]
Which is just a lot of unwanted code in my view.
Now it might be tempting to say "what if I used a #Variable# in Stroke Color, and just used !SetVariable to change the value of the variable on the mouse over?". That's fine, but the downside to that is that then you need a different set of "red" and "green" variables for each segment, so they are uniquely changed on mouse over. That means a ton of variables, and offers no real advantage.