It is currently March 28th, 2024, 3:49 pm

Slide animation Template (very simple)

Tips and Tricks from the Rainmeter Community
Post Reply
manci5
Posts: 5
Joined: September 5th, 2011, 4:45 pm

Slide animation Template (very simple)

Post by manci5 »

Hey guys, I just spent 2 hours figuring out this ultra-simple animation effects and made a template for you :D :
It includes an 8-frame bitmap image, but you can define your own bitmap image with desired number of frames. 8 frames means 4 frames for slide-out and 4 frames for slide-in effect. 4th slide is the main skin background and everything appears on that slide. More info in the "slide instructions.ini". here's the code:

Code: Select all

[rainmeter]
author=manuel
update=40
mouseoveraction=!setvariable go 1
mouseleaveaction=!execute [!setvariable go 1][!hidemetergroup everything]

[variables]
frames=8
;make sure you also change the two "ifequalvalue" below:
go=0

[count]
measure=calc
formula=count+#go#
dynamicvariables=1

[check]
measure=calc
formula=count
;-------------------------------------ifequalvalue is [(#frames#/2)-2] -----------##############
ifequalvalue=2
ifequalaction=!execute [!Setvariable go 0][!showmetergroup everything]

[check2]
measure=calc
formula=count
;-------------------------------------ifequalvalue is [#frames#-2]----------------##############
ifequalvalue=6
ifequalaction=!refresh

[MeterAnimation]
Meter=BITMAP
MeasureName=count
BitmapImage=box.png
BitmapFrames=#frames#
BitmapExtend=1

[string]
meter=string
measurename=count
y=5
x=1
text="mid: %1"
antialias=1
hidden=1
group=everything
You can download and try it:
Slide.rar
(12.09 KiB) Downloaded 1082 times
User avatar
XANCI
Posts: 104
Joined: September 18th, 2011, 6:37 am
Location: Nanjing, China

Re: Slide animation Template (very simple)

Post by XANCI »

some problems:
1.smooth animation required Update=40 or lower, keeping this will cause high CPU load
2.you may wish to control the slide bar in and out by some MouseCilckAction
3.you may wish to keep the setting(in or out) when refresh
4.you may wish to use the animation without refresh the skin(probably cuz some LINE & HISTOGRAM meters)

some modification:

in your .inc file

Code: Select all

[Variables]
status=0
in your skin(10 frames)

Code: Select all

[Rainmeter]
Update=20

[Variables]
@Include=yoursettings.inc
VARFILE=yoursettings.inc
Move=0

[MeasureInitialize]
Group=Ani
Measure=Calc
Formula=(#WiFi#=1)&&([MeasureB]=0) ? 1 : 0
DynamicVariables=1
IfAboveValue=0.5
IfAboveAction=!SetVariable Move 1

[MeasureB]
Group=Ani
Measure=Calc
Formula=(MeasureB+#Move#)%10
DynamicVariables=1

[MeasureStop1]
Group=Ani
Measure=Calc
Formula=[MeasureB]
DynamicVariables=1
IfEqualValue=3
IfEqualAction=!Execute [!SetOptionGroup Ani UpdateDivider 50][!SetVariable Move 0][!SetVariable status 1][!WriteKeyValue Variables status 1 #VARFILE#][!ShowMeterGroup SomeGroup][!Update]

[MeasureStop2]
Group=Ani
Measure=Calc
Formula=[MeasureB]
DynamicVariables=1
IfEqualValue=8
IfEqualAction=!Execute [!SetOptionGroup Ani UpdateDivider 50][!SetVariable Move 0][!SetVariable status 0][!WriteKeyValue Variables status 0 #VARFILE#]

[MeterB]
Group=Ani
MeasureName=MeasureB
Meter=BITMAP
BitmapImage=B.png
BitmapFrames=10
BitmapExtend=1
AntiAlias=1

[MeterSomeToClick]
SomeMouseAction=!Execute [!SetVariable Move 1][!SetOptionGroup Ani UpdateDivider 1][!UpdateMeter MeterB][!HideMeterGroup Everything][!Update]

[Meter1]
Group=Everything

[Meter2]
Group=Everything

...
GuessWho
Posts: 1
Joined: October 14th, 2011, 5:55 pm

Re: Slide animation Template (very simple)

Post by GuessWho »

Excuse Me Sir..may i ask you something??...mhm how to insert that program into rainmeter?? :thumbup:

manci5 wrote:Hey guys, I just spent 2 hours figuring out this ultra-simple animation effects and made a template for you :D :
It includes an 8-frame bitmap image, but you can define your own bitmap image with desired number of frames. 8 frames means 4 frames for slide-out and 4 frames for slide-in effect. 4th slide is the main skin background and everything appears on that slide. More info in the "slide instructions.ini". here's the code:

Code: Select all

[rainmeter]
author=manuel
update=40
mouseoveraction=!setvariable go 1
mouseleaveaction=!execute [!setvariable go 1][!hidemetergroup everything]

[variables]
frames=8
;make sure you also change the two "ifequalvalue" below:
go=0

[count]
measure=calc
formula=count+#go#
dynamicvariables=1

[check]
measure=calc
formula=count
;-------------------------------------ifequalvalue is [(#frames#/2)-2] -----------##############
ifequalvalue=2
ifequalaction=!execute [!Setvariable go 0][!showmetergroup everything]

[check2]
measure=calc
formula=count
;-------------------------------------ifequalvalue is [#frames#-2]----------------##############
ifequalvalue=6
ifequalaction=!refresh

[MeterAnimation]
Meter=BITMAP
MeasureName=count
BitmapImage=box.png
BitmapFrames=#frames#
BitmapExtend=1

[string]
meter=string
measurename=count
y=5
x=1
text="mid: %1"
antialias=1
hidden=1
group=everything
You can download and try it:
Slide.rar
burnwell88
Posts: 90
Joined: August 13th, 2009, 8:37 am

Re: Slide animation Template (very simple)

Post by burnwell88 »

GuessWho wrote:Excuse Me Sir..may i ask you something??...mhm how to insert that program into rainmeter?? :thumbup:

THIS might come in handy on my next skin :D thank you very much
Post Reply