the downside of this is that if your computer is busy the animation might run slower than normal, as the counter is based on the skin updates.
so why not using system time instead?
the animation will always take the same time then, it will skip frames instead of running slower.
here is the code i am using for this:
Code: Select all
[Rainmeter]
Update=(#FrameTime#)
BackgroundMode=1
[Metadata]
Author=Alex Becherer
Name=Animation System Time Example
Information=
Version=1.0
License=Creative Commons BY-NC-SA 3.0
[Variables]
NumberFrames=38
FrameTime=100
[MeasureTime]
Measure=Time
AverageSize=(1000/(#FrameTime#))
[MeasureStart]
Measure=Time
AverageSize=(1000/(#FrameTime#))
UpdateDivider=-1
[MeasureFrame]
Measure=Calc
DynamicVariables=1
Formula=(((((MeasureTime)*(1000/(#FrameTime#)))-((MeasureStart)*(1000/(#FrameTime#))))-((FLOOR((((MeasureTime)*(1000/(#FrameTime#)))-((MeasureStart)*(1000/(#FrameTime#))))/(#NumberFrames#)))*(#NumberFrames#)))+1)
[MeterImage]
Meter=Image
ImageName="#@#images\[MeasureFrame].png"
X=0
Y=0
DynamicVariables=1
there are two variables here:
NumberFrames= is the number of frames in the animation. frames' names start from 1. you can duplicate frame number 1 and name it 0, just to be save.
FrameTime= is the time for each frame in milliseconds.
an example skin is here:
http://yadi.sk/d/2-d6eBrOBkMLd