mak_kawa wrote:Possibly it is orthodox to achieve this with the shape meter using Rotate parameters? But, of course, I don't know how at all.
Actually the Shape meters can be very well used for such purposes. I partially rewrote your code, here is the result:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
HoursLength=50
MinutesLength=60
SecondsLength=70
[MeasureTime]
Measure=Time
[MeasureAngleH]
Measure=Calc
Formula=((( MeasureTime % 43200 ) / 120 ) - 90 )
[MeasureAngleM]
Measure=Calc
Formula=((( MeasureTime % 3600 ) / 10 ) - 90 )
[MeasureAngleS]
Measure=Calc
Formula=(( 6 * ( MeasureTime % 60 )) - 90 )
[MeterSeconds]
Meter=Shape
Shape=Rectangle (Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),(Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),#SecondsLength#,5 | Fill Color 255,255,255 | StrokeWidth 1 | Stroke Color 0,0,0 | Rotate [MeasureAngleS],3,3
DynamicVariables=1
[MeterMinutes]
Meter=Shape
Shape=Rectangle (Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),(Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),#MinutesLength#,5 | Fill Color 255,255,255 | StrokeWidth 1 | Stroke Color 0,0,0 | Rotate [MeasureAngleM],3,3
DynamicVariables=1
[MeterHours]
Meter=Shape
Shape=Rectangle (Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),(Max(#HoursLength#,Max(#MinutesLength#,#SecondsLength#))),#HoursLength#,5 | Fill Color 255,255,255 | StrokeWidth 1 | Stroke Color 0,0,0 | Rotate [MeasureAngleH],3,3
DynamicVariables=1
All of the three Calc measures ([MeasureAngleH], [MeasureAngleM] and [MeasureAngleS]) are returning an angle, in degrees. The value of each of them is used in a Shape meter, which corresponds to the appropriate hand of the clock. The length of these hands are given by the HoursLength, MinutesLength respectively SecondsLength variables, within the [Variables] section.
When I wrote the above code, I was inspired by eclectic-tech, who
replied to a question of mine yesterday.
Thanks once again eclectic-tech, if you're reading this.