It's exactly what I want!balala wrote:
I wrote a code with three ActionTimer plugin measures. Here it is:Note the followings:Code: Select all
[Rainmeter] Update=-1 [Variables] ImageNum=0 U1=[!UpdateMeasure "MeasureSlide1"][!UpdateMeter "MeterImage"][!Redraw] U2=[!UpdateMeasure "MeasureSlide2"][!UpdateMeter "MeterImage"][!Redraw] U3=[!UpdateMeasure "MeasureSlide3"][!UpdateMeter "MeterImage"][!Redraw] Limit1=42 Limit2=136 Limit3=154 Wait=250 [MeasureSlide1] Measure=Plugin Plugin=ActionTimer Group=Sliders ActionList1=Repeat Up1,#Wait#,#Limit1# Up1=[!SetVariable ImageNum "(Clamp((#ImageNum#+1),0,#Limit1#))"]#U1# IfCondition=(#ImageNum#=#Limit1#) IfTrueAction=[!UpdateMeasure "MeasureSlide2"][!CommandMeasure "MeasureSlide1" "Stop 1"][!CommandMeasure "MeasureSlide2" "Execute 1"] DynamicVariables=1 [MeasureSlide2] Measure=Plugin Plugin=ActionTimer Group=Sliders ActionList1=Repeat Up2,#Wait#,#Limit2#+2 Up2=[!SetVariable ImageNum "(Clamp((#ImageNum#+1),#Limit1#,#Limit3#))"]#U2# IfCondition=(#ImageNum#=#Limit2#+1) IfTrueAction=[!SetVariable Imagenum "(#Limit1#-1)"][!UpdateMeasure "MeasureSlide2"][!CommandMeasure "MeasureSlide1" "Stop 1"][!CommandMeasure "MeasureSlide2" "Stop 1"][!CommandMeasure "MeasureSlide2" "Execute 1"] DynamicVariables=1 [MeasureSlide3] Measure=Plugin Plugin=ActionTimer Group=Sliders ActionList1=Repeat Up2,#Wait#,#Limit3#-#Limit2#+2 Up2=[!SetVariable ImageNum "(Clamp((#ImageNum#+1),#Limit2#,#Limit3#))"]#U3# IfCondition=(#ImageNum#=#Limit3#) IfTrueAction=[!CommandMeasure "MeasureSlide3" "Stop 1"] DynamicVariables=1 [MeterButton1] Meter=Image SolidColor=255,0,0 X=0 Y=25 W=30 H=20 LeftMouseUpAction=[!CommandMeasure "MeasureSlide1" "Execute 1"] [MeterButton2] Meter=Image SolidColor=255,240,0 X=10R Y=0r W=30 H=20 LeftMouseUpAction=[!SetVariable ImageNum "(#Limit2#-1)"][!UpdateMeasure "MeasureSlide3"][!CommandMeasure "MeasureSlide1" "Stop 1"][!CommandMeasure "MeasureSlide2" "Stop 1"][!CommandMeasure "MeasureSlide3" "Execute 1"] [MeterImage] Meter=Image X=0 Y=10R ImageName=#@#Frame\Frame#ImageNum#.png DynamicVariables=1
Please test this code and let me know if it does what you need.
- The Update value of this code is set to -1, which means the skin never updates "by default". Updates are made throught the U1, U2 and respectively U3 variables.
- If you already have a code, just copy the LeftMouseUpAction options of the [MeterButton1] and [MeterButton2] meters and add them to the appropriate meters in your code. I had to create some meters to can control the skin.
- See the limits of the whole proces, defined as the Limit1, Limit2 and Limit3 variables in the [Variables] section. I think you can freely modify them.
- The images are controlled by the value of the ImageNum variable. The code as it is, will work if you have the images placed in the @Resources\Frame folder, their name are Frame and a number from 0 to 154 and their extension is .png. If these conditions aren't met, modify the code appropriately.
The code does the right thing, but there's only one problem:
gif runs now in slow motion and sometimes gets stuck
What's the cause?