Arless wrote:about the plugin i have no idea of how they work, so i tried to avoid them as much as i could, but if you are willing to give me a quick lesson, I can only accept and thank you again
ActionTimer is a very good plugin, which can help when you want to create animations for example. With this plugin you can avoid to have to set a small Update value.
Eg in the following code the Update is set to -1 (which means the skin is never updated). But to create the animation, we have to have some increasing / decreasing numeric values. In this case these values are represented by two variables (Diam, corresponding to the old [MeasureDiam] measure and Trasp, corresponding to [MeasureTrasp] - both defined in the [Variables] section). These variables are set by the new [MeasureDiam] and [MeasureTrasp] ActionTimer plugin measures.
I rewrote a lot of things and finally got the following code:
Code: Select all
[Rainmeter]
Update=-1
[Variables]
Diam=30
Trasp=60
Update=20
U=[!UpdateMeasure "MeasureDiam"][!UpdateMeasure "MeasureDiam2"][!UpdateMeasure "MeasureTrasp"][!UpdateMeasure "MeasureTrasp2"][!UpdateMeter "MeterRipple"][!UpdateMeter "Uptime"][!Redraw]
[MeterAct]
Meter=Button
Padding=120,120
MeasureName=MeasureAct
LeftMouseUpAction=[!ShowMeter "MeterRipple"][!CommandMeasure "MeasureDiam" "Execute 1"][!CommandMeasure "MeasureTrasp" "Execute 1"][!SetOption MeterRipple Shape "Ellipse $MouseX$,$MouseY$,#*Diam*# | Fill Color 255,255,255,#*Trasp*# | StrokeWidth 0 "][!Redraw]
[MeterBG]
Meter=Shape
Shape=Ellipse 60,60,60 | Fill Color 100,50,80,255 | StrokeWidth 0
[MeterRipple]
Meter=Shape
DynamicVariables=1
Shape=Ellipse 0,0,30 | Fill Color 255,255,255,0 | StrokeWidth 0
Shape2=Rectangle 0,0,120,120 | Fill Color 255,255,255,100 | StrokeWidth 0
Shape3=Ellipse 60,60,60 | Fill Color 255,255,255,100 | StrokeWidth 0
Shape4=Combine Shape2 | XOR Shape3
Shape5=Combine Shape | XOR Shape4 | Exclude Shape4
Hidden=1
[MeasureDiam]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Up,#Update#,20
Up=[!SetVariable Diam "(Clamp((#Diam#+3),30,90))"]#U#
DynamicVariables=1
[MeasureDiam2]
Measure=Calc
Formula=#Diam#
IfCondition=(#CURRENTSECTION#>=60)
IfTrueAction=[!CommandMeasure "MeasureDiam" "Stop 1"][!SetVariable Diam "30"]#U#
DynamicVariables=1
[MeasureTrasp]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Up,#Update#,20
Up=[!SetVariable Trasp "(Clamp((#Trasp#-6),0,60))"]#U#
DynamicVariables=1
[MeasureTrasp2]
Measure=Calc
Formula=#Trasp#
IfCondition=(#CURRENTSECTION#<=0)
IfTrueAction=[!CommandMeasure "MeasureTrasp" "Stop 1"][!SetVariable Trasp "60"][!HideMeter "MeterRipple"]#U#
DynamicVariables=1
See the Update value set up to -1 in the [Rainmeter] section. Also added a lot of variables. U is used by the ActionTimer plugin measures, which has to update the appropriate measures / meters, because they are never updated, due to the Update set to -1. The two !CommandMeasure bangs in the LeftMouseUpAction option of the [MeterAct] meter, run the two ActionTimer plugins when you click. In this moment, the measures start to modify the values of the variables, increasing the Diam and decreasing the Trasp variable. [MeasureDiam2] and [MeasureTrasp2] are also updated in each cycle and they are used to stop the plugin measures in the appropriate moment. When the plugins are stopped, new values are also set for the Diam and Trasp variables, to restore the initial situation, with the initial values of the variables.
Please try this code and let me know how is it working. Also come back if you have any question about it.