It is currently November 28th, 2022, 3:56 pm

How to display animation in Rainmeter

Tips and Tricks from the Rainmeter Community
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to display animation in Rainmeter

Post by jsmorley »

Might want to look at something like:

Code: Select all

[ImageNumberCalc]
Measure=Loop
StartValue=0
EndValue=7080
RegExpSubstitute=1
Substitute="^(\d)$":"0000\1","^(\d\d)$":"000\1","^(\d\d\d)$":"00\1","^(\d\d\d\d)$":"0\1"

[ImageMeter]
Meter=Image
ImageName=#@#ImagesFrames\IMG[ImageNumberCalc].bmp
AntiAlias=1
DynamicVariables=1
That will loop from 0 to 7080, it will then use substitute to add the correct number of leading zeroes on the number, so when you use the measure's string value appended to "IMG" in the file name, it should be correct.

https://docs.rainmeter.net/manual-beta/measures/loop/
https://docs.rainmeter.net/manual-beta/measures/general-options/substitute/#RegExpSubstitute
https://docs.rainmeter.net/manual-beta/skins/option-types/#RegExp
User avatar
jsmorley
Developer
Posts: 22551
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to display animation in Rainmeter

Post by jsmorley »

P.S. The Counter function will work as well, the main difference is that Counter is not reset on a refresh of the skin, but only starts with "0" when the skin is first loaded. The Loop measure will restart on any refresh of the skin. Depends on the behavior you want.

https://docs.rainmeter.net/manual-beta/measures/calc/#Formulas
User avatar
ikarus1969
Posts: 521
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How to display animation in Rainmeter

Post by ikarus1969 »

jsmorley wrote:Might want to look at something like:

Code: Select all

...
Substitute="^(\d)$":"0000\1","^(\d\d)$":"000\1","^(\d\d\d)$":"00\1","^(\d\d\d\d)$":"0\1"
...
as often there are more than 1 way to code. So another approach for the substitute could be:

Code: Select all

Substitute="^(\d*)$":"00000\1","^.*(\d{5,5})$":"\1"
xTurtleZ
Posts: 3
Joined: December 21st, 2016, 12:29 pm

Re: How to display animation in Rainmeter

Post by xTurtleZ »

ohh

that made it work! thanks!!
looks real good, the lower fps actually makes it look less spacey.

heres a short clip ofwhat it looks like now: https://gyazo.com/7f708c68b3269a5f7fa6d5eedb3966a1

and where i got it from: https://www.youtube.com/watch?v=ddJiP3jRVJ8

and you guys for helping out ofcourse :)

i'd like to get more into making these things myself, not much free time lately..

thanks again
:welcome: