It is currently November 29th, 2020, 4:42 pm

HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by Yincognito »

strawberryshortcake wrote: October 11th, 2020, 12:43 pm One quick thing ... can someone explain what the the word Repeat means in the following. 100 is the number of frames in the animation. But if I were to ever only want this actiontimer sequence to execute only one time, why the word Repeat. I tried replacing the word repeat with something made up, but nothing happens (the code didn't run). When I was reading the literature, the explanation used the words "Do something".

Code: Select all

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat One,#Speed#,100
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1
Manual says:
Repeat Action name, Wait time number, Repeat count number
This will repeat the named Action option Repeat count times, with a wait of Wait time milliseconds between each. Note that Wait time is not applied after the last execution of Action name, only between each.
You say that "if I were to ever only want this actiontimer sequence to execute only one time", but you forget that even though you execute it just one time ... it's still a SEQUENCE. Meaning, while the action iself is that sequence, the actual sequence is still an iteration (of 1 to 100 in this case) of many other small things happening, like setting that variable in "One" followed by updating and redrawing meters.

Even more specific: you see the animation as one "action", i.e. the things happening in ActionList1, but in effect that animation is just a group of many similar but separate processes, i.e. setting the variable + updating meters + redrawing, that are "repeated" a certain number of times to create the illusion of an "animation" happening. It's like a movie: while the movie is one file, that movie is actually a sequence of N frames that the player "repeats" showing them (or each one of them) on the screen in a quick succession.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by Yincognito »

jsmorley wrote: October 11th, 2020, 1:39 pmYou certainly CAN do endless animations with ActionTimer. You just need to be quite careful that you do it correctly, and since the result can be ugly, we don't recommend it. Nothing forbids it however...
Precisely. I was referring to that animation freezing up if you don't do it correctly. You probably remember that we talked about this a while ago, and the thing that was missing (and the reason why it froze on my system, but curriously not on yours, even though it was the same code) was that there wasn't a WAIT time at the end of the action, like:

Code: Select all

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #SlidingUpdate#
ActionList2=Slide | Wait #SlidingUpdate# | Rerun | Wait #SlidingUpdate#
Slide=[!SetVariable SlidingOffset (#SlidingOffset#-#CurrentStep#)][!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1
The presence of | Wait #SlidingUpdate# - like parts at the end of actions is absolutely critical if you look for endless animation without freezing. I realized this after quite a while after discussing it in that thread.

P.S. ActionList1 is present here in case I only want the "slide" to happen once, i.e. no endless running.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by Yincognito »

strawberryshortcake wrote: October 11th, 2020, 1:14 pm If you look at the puddle of water (especially if you create a black background), a sliver of the puddle on the left is cut off. The OCD in me is on a mission to fix it either scaling down the raindrop with gimp or figuring out how to mathematically scoot the Bubble away from the left screen a bit.

I meant the liquid bubble mathematics.
Yep, I noticed it now. Actually, it doesn't have anything to do with the formulas, in fact those formulas are producing the correct result... as long as the hardcoded values are appropriate to begin with. Just add a +50 in a formula to all hardcoded X-es in template.ini (or even better, replace them with the result of the addition), like this:

Code: Select all

;=============================
;
;	GREEN BUBBLE
;
;=============================


;=========================================================
;
;	ACTION TIMER BUTTERFLY ANIMATION
;	V	V	V	V
;=========================================================
[Timer]
Measure=Calc
Formula=Timer
IfCondition=Timer
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


;------------------------------------------------------------ 	
;	36 is the number of animation frames. Unfortuntely, this is part of the
;	problem causing the Actionlist1 still currenty running error IF I decide to 
;	mouseover the same icon multiple times. 
;	Using 35 or 36 frames of an actiontimer animation easily triggers the 
;	[ActionnList1 is currently active]  error message.
;
;	There are two locations (immediately below) for the the number 36
; 	This ActionTimer plugin is causing the error message, and 
;	I'm not quite sure how to fix it other than just decreasing the amount of animation 
;	frames.. Originally The action was written to to repeat three times. I had to remove it
; 	so the animation only plays once through. Not sure if the "repeat" 
;	word is causing any issue. I think "repeat" is a built in keyword for actiontimer.
;------------------------------------------------------------

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat One,#Speed#,36
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1


[MeasureEnd]
Measure=Calc
Formula=#Frame#
IfCondition=(MeasureEnd=36)
IfTrueAction=[!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!Redraw]
DynamicVariables=1
UpdateDivider=-1


[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
X=(-200+50)
Y=0
DynamicVariables=1


[MeterFrame]
Meter=STRING
MEasureName=Timer
X=(0+50)
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1#CRLF##Frame#
DynamicVariables=1
Hidden=1


;=========================================================
;	^	^	^	^
;	ACTION TIMER BUTTERFLY ANIMATION
;
;=========================================================







;=========================================================
;
;	A third method would run the once started animation 
;	until its end, no matter when you leave the image
;		V	V	V	V
;=========================================================


;[MeasureNumberCalc]
;Measure=Calc
;Formula=(( MeasureNumberCalc + 1 ) % 30)
;IfCondition=(MeasureNumberCalc=0)
;IfTrueAction=[!PauseMeasure "MeasureNumberCalc"]
;Paused=1


;[MeterBG]
;Meter=Image
;ImageName=#@#tmp-[MeasureNumberCalc].png
;X=-200
;Y=0
;DynamicVariables=1
;MouseOverAction=[!UnpauseMeasure "MeasureNumberCalc"]

;=========================================================
;		^	^	^	^
;	A third method would run the once started animation 
;	until its end, no matter when you leave the image
;
;=========================================================



[measureSTYLE]
Measure=String
String=#CURRENTFILE#
Substitute=".ini":"","Style ":""
UpdateDivider=-1

[measureNUMBER]
Measure=String
String=#CURRENTCONFIG#
Substitute="LiquidBubbles\":"","Bubble ":""
UpdateDivider=-1

[measurePROCESS]
Measure=Plugin
Plugin=Process
ProcessName=[#process[&measureSTYLE]]




;========================================================
;
;	Hover On / Off 
;=========================================================

;ORIGINAL
;====== OFF =======

IfBelowValue=1
IfBelowAction=[!SetOption animation ImageTint "#c_animation1#"][!HideMeter glow][!ShowMeter shadow]

;====== ON ========

IfAboveValue=0
IfAboveAction=[!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow]
UpdateDivider=10

;========================================================
;
;	Hover On / Off 
;=========================================================







;=============================================
;
;	FORMULA - START
;
;=============================================


[measureINCREASE]
Measure=Calc
Formula=measureINCREASE + (measureINCREASE < #max_frames#)
IfEqualValue=#max_frames#
IfEqualAction=[!DisableMeasure measureINCREASE]
Disabled=1
UpdateDivider=1

[measureDECREASE]
Measure=Calc
Formula=(measureDECREASE + (#max_frames# + 1) - 1) % (#max_frames# + 1)
IfEqualValue=0
IfEqualAction=[!DisableMeasure measureDECREASE]
Disabled=1
UpdateDivider=1

[measureSUM]
Measure=Calc
Formula=measureINCREASE + measureDECREASE
UpdateDivider=1


;=============================================
;
;	FORMULA - END
;
;=============================================







;=============================================
;
;	BUBBLE AESTHETICS - START
;
;=============================================
[styleSHADOW]
DynamicVariables=1
ImageName=shadow.png
ImagePath=#@#
ImageTint=#c_shadow#
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]+6)
X=([button:X]+5)
Y=([button:Y]+5)

[styleGLOW]
DynamicVariables=1
Hidden=1
ImageName=glow.png
ImagePath=#@#
ImageTint=#c_animation2#,125
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]+10)
X=(0+50)
Y=0
;=============================================
;
;	BUBBLE AESTHETICS - END
;
;=============================================






;=======================================================================================================================================
;=======================================================================================================================================
;=======================================================================================================================================
;			
;				[styleBUTTON]
	
;		STYELBUTTON SECTION 	STYELBUTTON SECTION	STYELBUTTON SECTION	STYELBUTTON SECTION	STYELBUTTON SECTION
;	v	v	v	v
;
;
;=============================================
;
;	ORIGINAL STYLEBUTTON'S MOUSE ACTIONS
;	v	v	v	v
;=============================================

[styleBUTTON]
;MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]
;ImageName=bubble.png

;=============================================
;	^	^	^	^
;	ORIGINAL STYLEBUTTON'S MOUSE ACTIONS
;
;=============================================





;=============================================
;
;	MOUSE OVER ACTION - TESTING 
;	V	V	V	V
;=============================================

;-----------------------------------------------
;	THESE ARE CURRENTLY IN USE AND ACTIVE
;	v	v	v	v


; MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
; MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
; LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]


MouseOverAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "(3+50)"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "(5+50)"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]


;	^	^	^	^
;	THESE ARE CURRENTLY IN USE AND ACTIVE
;-----------------------------------------------



;-----------------------------------------------
;	DECIDED NOT TO USE THESE (MAYBE THESE MIGHT WORK BETTER THOUGH?)

;MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]
; FREEZES ANIMATION MouseOverAction=[!ShowMeter "MeterButterflies"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!Redraw]
;>>>>>>>>>>>>>>>>>>
;MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ActivateConfig "#RootConfig#\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ClearMouseAction ImageMeter "MouseOverAction|MouseLeaveAction"][!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]

;LeftMouseUpAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;===========MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ActivateConfig "#RootConfig#\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;===========MouseLeaveAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;==========LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]
;LeftMouseUpAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;=============================================
;	^	^	^	^
;	MOUSE OVER ACTION - TESTING
;
;=============================================

ImageName=bubble.png
ImagePath=#@#
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=[#w_[&measureSTYLE]]
X=(5+50)
Y=5


;=============================================

;	^	^	^	^
;
;		STYELBUTTON SECTION 	STYELBUTTON SECTION 	STYELBUTTON SECTION 	STYELBUTTON SECTION 
;
;=======================================================================================================================================
;=======================================================================================================================================
;=======================================================================================================================================
;	




[styleTEXT]
AntiAlias=1
DynamicVariables=1
FontColor=#f_color#
FontFace=#f_face#
FontSize=#f_size#
Hidden=1
StringAlign=LeftCenter
Text=[#text[&measureNUMBER]]
X=([button:X]+[button:W]+15)
Y=(([#w_[&measureSTYLE]]/2)+5)


[styleANIMATION]
AntiAlias=1
DynamicVariables=1
GreyScale=1
ImageName=frame ([measureSUM]).png
ImagePath=#@#Frames\
ImageTint=#c_animation1#
PreserveAspectRatio=1
UpdateDivider=1
W=([button:W])
X=([button:X]+1)
Y=([button:Y]+1)

[styleICON]
AntiAlias=1
DynamicVariables=1
ImageName=icon[measureNUMBER].png
ImagePath=#@#Icons\
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]-34)
X=([button:X]+(([button:W]-([button:W]-34))/2))
Y=([button:Y]+(([button:W]-([button:W]-34))/2))
The formulas you mentioned don't need modifications because they already use the other meters' newly adjusted X positions, through the [button:X] and such parts.

Naturally, since the meters are moved to the right to avoid cutting off the "lake" where the "drop" falls, a certain "empty" space will be present on the left side of the skin.
User avatar
balala
Rainmeter Sage
Posts: 11827
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by balala »

strawberryshortcake wrote: October 11th, 2020, 12:43 pm One quick thing ... can someone explain what the the word Repeat means in the following. 100 is the number of frames in the animation. But if I were to ever only want this actiontimer sequence to execute only one time, why the word Repeat.
Probably to keep the same format as when more executions go on. For instance ActionList1=Repeat One,#Speed#,1 is perfectly valid (another question is if makes sense, however for sure it is valid) and it has the same format as for 100 - or any number - of executions.
strawberryshortcake wrote: October 11th, 2020, 12:43 pm I tried replacing the word repeat with something made up, but nothing happens (the code didn't run). When I was reading the literature, the explanation used the words "Do something".
No need to replace it. You can use in this option the following components: Action name, Repeat and Wait. Other terms are probably not accepted.
User avatar
balala
Rainmeter Sage
Posts: 11827
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by balala »

strawberryshortcake wrote: October 11th, 2020, 12:33 pm What caused me to think it was not possible was because of the following. I'm not sure what the purpose of having an ignore warning embedded in the code would be if it doesn't really prevent any issues (i.e. rainmeter locking up if actiontimer is looped forever).
Another thing which might have been confusing you is the following one: although an ActionList can be stoped, what can't be is a !Delay bang. This bang for sure can't be interupted or stoped, once it has been started. Not even a refresh of the skin doesn't interupt it. See the second paragraph here.
So these actions (the ActionTimer plugin and the !Delay bang) being somehow similar things, I think this is what might have been confused you.
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by strawberryshortcake »

Yincognito wrote: October 11th, 2020, 2:37 pm Yep, I noticed it now. Actually, it doesn't have anything to do with the formulas, in fact those formulas are producing the correct result... as long as the hardcoded values are appropriate to begin with. Just add a +50 in a formula to all hardcoded X-es in template.ini (or even better, replace them with the result of the addition), like this:

Code: Select all

;=============================
;
;	GREEN BUBBLE
;
;=============================


;=========================================================
;
;	ACTION TIMER BUTTERFLY ANIMATION
;	V	V	V	V
;=========================================================
[Timer]
Measure=Calc
Formula=Timer
IfCondition=Timer
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat One,#Speed#,36
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1


[MeasureEnd]
Measure=Calc
Formula=#Frame#
IfCondition=(MeasureEnd=36)
IfTrueAction=[!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!Redraw]
DynamicVariables=1
UpdateDivider=-1


[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
X=(-200+50)
Y=0
DynamicVariables=1


[MeterFrame]
Meter=STRING
MEasureName=Timer
X=(0+50)
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1#CRLF##Frame#
DynamicVariables=1
Hidden=1


;=========================================================
;	^	^	^	^
;	ACTION TIMER BUTTERFLY ANIMATION
;
;=========================================================







;=========================================================
;
;	A third method would run the once started animation 
;	until its end, no matter when you leave the image
;		V	V	V	V
;=========================================================


;[MeasureNumberCalc]
;Measure=Calc
;Formula=(( MeasureNumberCalc + 1 ) % 30)
;IfCondition=(MeasureNumberCalc=0)
;IfTrueAction=[!PauseMeasure "MeasureNumberCalc"]
;Paused=1


;[MeterBG]
;Meter=Image
;ImageName=#@#tmp-[MeasureNumberCalc].png
;X=-200
;Y=0
;DynamicVariables=1
;MouseOverAction=[!UnpauseMeasure "MeasureNumberCalc"]

;=========================================================
;		^	^	^	^
;	A third method would run the once started animation 
;	until its end, no matter when you leave the image
;
;=========================================================



[measureSTYLE]
Measure=String
String=#CURRENTFILE#
Substitute=".ini":"","Style ":""
UpdateDivider=-1

[measureNUMBER]
Measure=String
String=#CURRENTCONFIG#
Substitute="LiquidBubbles\":"","Bubble ":""
UpdateDivider=-1

[measurePROCESS]
Measure=Plugin
Plugin=Process
ProcessName=[#process[&measureSTYLE]]




;========================================================
;
;	Hover On / Off 
;=========================================================

;ORIGINAL
;====== OFF =======

IfBelowValue=1
IfBelowAction=[!SetOption animation ImageTint "#c_animation1#"][!HideMeter glow][!ShowMeter shadow]

;====== ON ========

IfAboveValue=0
IfAboveAction=[!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow]
UpdateDivider=10

;========================================================
;
;	Hover On / Off 
;=========================================================







;=============================================
;
;	FORMULA - START
;
;=============================================


[measureINCREASE]
Measure=Calc
Formula=measureINCREASE + (measureINCREASE < #max_frames#)
IfEqualValue=#max_frames#
IfEqualAction=[!DisableMeasure measureINCREASE]
Disabled=1
UpdateDivider=1

[measureDECREASE]
Measure=Calc
Formula=(measureDECREASE + (#max_frames# + 1) - 1) % (#max_frames# + 1)
IfEqualValue=0
IfEqualAction=[!DisableMeasure measureDECREASE]
Disabled=1
UpdateDivider=1

[measureSUM]
Measure=Calc
Formula=measureINCREASE + measureDECREASE
UpdateDivider=1


;=============================================
;
;	FORMULA - END
;
;=============================================







;=============================================
;
;	BUBBLE AESTHETICS - START
;
;=============================================
[styleSHADOW]
DynamicVariables=1
ImageName=shadow.png
ImagePath=#@#
ImageTint=#c_shadow#
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]+6)
X=([button:X]+5)
Y=([button:Y]+5)

[styleGLOW]
DynamicVariables=1
Hidden=1
ImageName=glow.png
ImagePath=#@#
ImageTint=#c_animation2#,125
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]+10)
X=(0+50)
Y=0
;=============================================
;
;	BUBBLE AESTHETICS - END
;
;=============================================






;=======================================================================================================================================
;=======================================================================================================================================
;=======================================================================================================================================
;			
;				[styleBUTTON]
	
;		STYELBUTTON SECTION 	STYELBUTTON SECTION	STYELBUTTON SECTION	STYELBUTTON SECTION	STYELBUTTON SECTION
;	v	v	v	v
;
;
;=============================================
;
;	ORIGINAL STYLEBUTTON'S MOUSE ACTIONS
;	v	v	v	v
;=============================================

[styleBUTTON]
;MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]
;ImageName=bubble.png

;=============================================
;	^	^	^	^
;	ORIGINAL STYLEBUTTON'S MOUSE ACTIONS
;
;=============================================





;=============================================
;
;	MOUSE OVER ACTION - TESTING 
;	V	V	V	V
;=============================================

;-----------------------------------------------
;	THESE ARE CURRENTLY IN USE AND ACTIVE
;	v	v	v	v


; MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
; MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
; LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]


MouseOverAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "(3+50)"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "(5+50)"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]


;	^	^	^	^
;	THESE ARE CURRENTLY IN USE AND ACTIVE
;-----------------------------------------------



;-----------------------------------------------
;	DECIDED NOT TO USE THESE (MAYBE THESE MIGHT WORK BETTER THOUGH?)

;MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseOverAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]
; FREEZES ANIMATION MouseOverAction=[!ShowMeter "MeterButterflies"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!Redraw]
;>>>>>>>>>>>>>>>>>>
;MouseLeaveAction=[!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ActivateConfig "#RootConfig#\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ClearMouseAction ImageMeter "MouseOverAction|MouseLeaveAction"][!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]

;LeftMouseUpAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;===========MouseOverAction=[!ShowMeter text][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption button X "3"][!SetOption button Y "3"][!SetOption button W "([#w_[&measureSTYLE]]+6)"][Play "#@#select.wav"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;MouseLeaveAction=[!ActivateConfig "#RootConfig#\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Redraw]
;===========MouseLeaveAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;==========LeftMouseUpAction=["[#path[&measureNUMBER]]"][!EnableMeasure measureINCREASE][!DisableMeasure measureDECREASE][!SetOption animation ImageTint "#c_animation2#"][!ShowMeter glow][!HideMeter shadow][!UpdateMeter animation][!UpdateMeter glow][!UpdateMeter shadow][!Redraw]
;LeftMouseUpAction=[!ActivateConfig "LiquidBubbles\Raindrops" "Raindrops.ini"][!HideMeter text][!DisableMeasure measureINCREASE][!EnableMeasure measureDECREASE][!SetOption button X "5"][!SetOption button Y "5"][!SetOption button W "[#w_[&measureSTYLE]]"][!UpdateMeter button][!UpdateMeter animation][!UpdateMeter icon][!Redraw][!Delay 20][!UpdateMeter shadow][!UpdateMeter glow][!Delay 3000][!DeactivateConfig "LiquidBubbles\Raindrops"][!Redraw]
;=============================================
;	^	^	^	^
;	MOUSE OVER ACTION - TESTING
;
;=============================================

ImageName=bubble.png
ImagePath=#@#
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=[#w_[&measureSTYLE]]
X=(5+50)
Y=5


;=============================================

;	^	^	^	^
;
;		STYELBUTTON SECTION 	STYELBUTTON SECTION 	STYELBUTTON SECTION 	STYELBUTTON SECTION 
;
;=======================================================================================================================================
;=======================================================================================================================================
;=======================================================================================================================================
;	




[styleTEXT]
AntiAlias=1
DynamicVariables=1
FontColor=#f_color#
FontFace=#f_face#
FontSize=#f_size#
Hidden=1
StringAlign=LeftCenter
Text=[#text[&measureNUMBER]]
X=([button:X]+[button:W]+15)
Y=(([#w_[&measureSTYLE]]/2)+5)


[styleANIMATION]
AntiAlias=1
DynamicVariables=1
GreyScale=1
ImageName=frame ([measureSUM]).png
ImagePath=#@#Frames\
ImageTint=#c_animation1#
PreserveAspectRatio=1
UpdateDivider=1
W=([button:W])
X=([button:X]+1)
Y=([button:Y]+1)

[styleICON]
AntiAlias=1
DynamicVariables=1
ImageName=icon[measureNUMBER].png
ImagePath=#@#Icons\
PreserveAspectRatio=1
SolidColor=#c_trigger#
W=([button:W]-34)
X=([button:X]+(([button:W]-([button:W]-34))/2))
Y=([button:Y]+(([button:W]-([button:W]-34))/2))
The formulas you mentioned don't need modifications because they already use the other meters' newly adjusted X positions, through the [button:X] and such parts.

Naturally, since the meters are moved to the right to avoid cutting off the "lake" where the "drop" falls, a certain "empty" space will be present on the left side of the skin.

That fixed it. Sweet.
:17good




ORIGINAL POST BEFORE THE EDIT:

Another question about actiontimer would be how do I get them to play in a loop continuously, BUT the user has the power to stop the loop? I was trying this all day yesterday, but couldn't exactly get it to work. I can get this done using the simple loop animation formula but am having trouble using the actiontimer formula because I'm not exactly sure how to make it play in a continuously loop.

This is specifically for a recycle bin. Full recycle >>> play animation. Empty recycle bin >>>> stop animation.

The simple loop animation's spherical lights kind of stutters at certain points which is why I'm trying to figure out a way to use ActionTimer animations.

Simple animation using:

Code: Select all


;===========================================
;
;	BUTTERFLY SIMPLE ANIMATION
;		ONGOING LOOP
;
;===========================================


[Variables]

[MeasureTimer]
Measure=Calc
;Formula=( COUNTER % 100 )
Formula=( COUNTER % 48 )


[MeterCurrency]
Meter=Image
ImageName=#@#tmp-[MeasureTimer].png
X=0
Y=0
DynamicVariables=1

Full length simple animation plus recycle bin code:

Code: Select all

;=======================================
;
; ROTATING ORBIT RECYCLE BIN
;		
;
;	SIMPLER ANIMATION
;=======================================

[Rainmeter]
Author=Misteroizo
BackgroundMode=1
Update=100


[Metadata]
Version=3.3
License=Free
Information=CenterBubbles_StartOrb
;End of added Metadata

;==================================================================================================================
;==================================================================================================================
;==================================================================================================================

		ROTATIONAL SPHERES SECTION	- START
;==================================================================================================================
;==================================================================================================================
;==================================================================================================================

;=============================================
;
;	ROTATION SPHERE'S GREEN,WHITE,BLUE
;	V	V	V	V
;=============================================

[MeasureTime]
Measure=Calc
Formula=MeasureTime1 * 12

[MeasureTime1]
Measure=Time
AverageSize=10



;=============================================
;
;	ROTATIONAL SPHERE #GREEN
;=============================================


[MeterUnder6]
MeasureName=MeasureTime
Meter=ROTATOR
W=1
H=1
;	/////////////////////////////
; 	green dark glow round rotating
x=250
;	/////////////////////////////

;-----------Point1.png is the image representating the green sphere
ImageName=Point1.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=110
OffsetX=67
OffsetY=67

;=============================================
;
;	ROTATIONAL SPHERE #WHITE
;=============================================

[MeterUnder7]
MeasureName=MeasureTime
Meter=ROTATOR
y=2
W=94
H=94
;	/////////////////////////////
; 	yellow/white glow round rotating
x=200
;	/////////////////////////////

;-----------Point2.png is the image representating the white sphere
ImageName=Point2.png
StartAngle=6.2831853
RotationAngle=-6.2831853
ValueReminder=130
OffsetX=47
OffsetY=47

;OffsetX=97
;OffsetY=97
;UpdateDivider=100


;=============================================
;
;	ROTATIONAL SPHERE #BLUE
;=============================================

[MeterUnder8]
MeasureName=MeasureTime
Meter=ROTATOR
;x=29
y=49
W=40
D=50

;	/////////////////////////////
; 	light blue glow round rotating
x=240
;	/////////////////////////////

;-----------Point6.png is the image representating the blue sphere
ImageName=Point6.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=130
OffsetX=87
OffsetY=87

;==================================================================================================================
;==================================================================================================================
;==================================================================================================================

		ROTATIONAL SPHERES SECTION	- END
;==================================================================================================================
;==================================================================================================================
;==================================================================================================================













;==================================================================================================================
;==================================================================================================================
;==================================================================================================================

		TRASH BIN ( JUST A BIN ) SECTION
;==================================================================================================================
;==================================================================================================================
;==================================================================================================================


[Variables]
IconSize=32
IconEmpty=#@#Empty.png
IconFull=#@#Full.png

[Style]
StringAlign=Right
InlineSetting=Face | Roboto
InlineSetting2=Size | 9
InlineSetting3=Color | 255,255,255,255
AntiAlias=1

[MeasureCount]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Count
Drives=All

[MeasureSize]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Size
Drives=All




;=============================================
;	CODE FROM TRASH CAN - JUST A BIN
;	
;		EMPTY VS FULL
;=============================================
[MeasureAction]
Measure=Calc
IfCondition=MeasureCount > 0

;========= True FULL Trash
IfTrueAction=[!UnpauseMeasure MeasureTimer][!ShowMeter MeterCurrency][!RainmeterHideMeter MeterIconEmpty][!RainmeterShowMeter MeterIconFull][!RainmeterShowMeter MeterCount][!ShowMeter MeterUnder6][!ShowMeter MeterUnder7][!ShowMeter MeterUnder8]

;========= False EMPTY Trash
IfFalseAction=[!PauseMeasure MeasureTimer][!HideMeter MeterCurrency][!RainmeterHideMeter MeterIconFull][!RainmeterShowMeter MeterIconEmpty][!RainmeterHideMeter MeterCount][!HideMeter MeterUnder6][!HideMeter MeterUnder7][!HideMeter MeterUnder8]

;=============================================
;	CODE FROM TRASH CAN - JUST A BIN
;	
;		EMPTY VS FULL
;=============================================


[MeterIconBackground]
Meter=Image
X=15
Y=27
W=19
H=26
SolidColor=255,255,255,1

[MeterIconEmpty]
Meter=Image
X=10
Y=20
W=#IconSize#
ImageName=#IconEmpty#
AntiAlias=1

[MeterIconFull]
Meter=Image
X=10
Y=20
W=#IconSize#
ImageName=#IconFull#


;=============================================
;	CODE FROM TRASH CAN - JUST A BIN
;	
;=============================================


[StartButton]
Meter=Button
ButtonImage=#SKINSPATH#\\CenterOrbBull\Startorb - ORIGINAL.png
SolidColor=0,0,0,1
x=200


MouseOverAction=[!RainmeterShowMeter MeterSize][!Redraw]
MouseLeaveAction=[!RainmeterHideMeter MeterSize][!Redraw]
LeftMouseUpAction=[!RainmeterPluginBang "MeasureCount OpenBin"]
RightMouseUpAction=[!RainmeterPluginBang "MeasureCount EmptyBin"]
AntiAlias=1
Hidden=0

;=============================================
;	CODE FROM TRASH CAN - JUST A BIN
;=============================================


[MeterSize]
Meter=String
MeasureName=MeasureSize
X=55
Y=0
MeterStyle=Style
Text=%1B
AutoScale=1
NumOfDecimals=1
Hidden=1

[MeterCount]
Meter=String
MeasureName=MeasureCount
X=r
Y=(13)r
MeterStyle=Style
Text=%1


;==================================================================================================================
;==================================================================================================================
;==================================================================================================================

		TRASH BIN ( JUST A BIN ) SECTION
;==================================================================================================================
;==================================================================================================================
;==================================================================================================================








;===========================================
;
;	BUTTERFLY SIMPLE ANIMATION
;		ONGOING LOOP
;
;===========================================


[Variables]

[MeasureTimer]
Measure=Calc
;Formula=( COUNTER % 100 )
Formula=( COUNTER % 48 )


[MeterCurrency]
Meter=Image
ImageName=#@#tmp-[MeasureTimer].png
X=0
Y=0
DynamicVariables=1


AcitonTimer Animation - How do I modify it so it plays continously in a loop (Note: I purposely want this done so I can have myself (the user) stop the loop when I want .. i.e. empty recycling bin)"

This portion plays a 'short loop' but not long enough, plus, it 'blinks' (animation disappears, then reappears after certain time points -- I'm looking to modify it so the actiontimer animation plays continously in a loop.

The upper code is found here, partial code... full code after this part.

Code: Select all

; 	RAINDROP ACTIONTIMER?
;	[Timer]
;	Measure=Calc
;	Formula=Timer
;	IfCondition=Timer
;	IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


[Timer]
Measure=Calc
Formula=( Timer + 1 )
IfCondition=((Timer=30)||(Timer=120)||(Timer=150))
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


;	The following doesn't work
;	[Timer]
;	Measure=Calc
;	Formula=(Timer %100) +1
;	IfCondition=Timer
;	IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


;		butterflies ACTION TIMER
; 	RAINDROP
[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
;ActionList1=Repeat One,#Speed#,36
ActionList1=Repeat One,#Speed#,48
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1




ActionTimer Animation code:

Code: Select all

;=======================================
;
;	o	r	a	n	g	e
; ROTATING ORBIT RECYCLE BIN
;
;	loops the water drop continuosly
;=======================================



;=======================================
;
; ROTATING ORBIT RECYCLE BIN
;
;=======================================

[Rainmeter]
Author=Misteroizo
BackgroundMode=1
Update=100




;=======================================
;
; from ACTIONTIMER BUTTERFLY START
;
;=======================================

;BackgroundMode=2
;SolidColor=0,0,0,1
;OnRefreshAction=[!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!Redraw][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]
;OnRefreshAction=[!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]

;=======================================
;
; from ACTIONTIMER BUTTERFLY START
;
;=======================================




[Metadata]
Version=3.3
License=Free
Information=CenterBubbles_StartOrb
;End of added Metadata


[Variables]


;=======================================
;
; from ACTIONTIMER BUTTERFLY START
;	V	V	V	V
;=======================================

Frame=0
Speed=100
U=[!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!UpdateMeter "MeterButterflies"][!UpdateMeter "MeterFrame"][!Redraw]

;=======================================
;	^	^	^	^
; from ACTIONTIMER BUTTERFLY END
;
;=======================================


;=========================================================
;
;	ACTION TIMER BUTTERFLY ANIMATION
;	V	V	V	V
;=========================================================

; 	RAINDROP ACTIONTIMER?
;	[Timer]
;	Measure=Calc
;	Formula=Timer
;	IfCondition=Timer
;	IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]

[Timer]
Measure=Calc
Formula=(Timer %100) +1
IfCondition=Timer
IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw]


;		butterflies ACTION TIMER
; 	RAINDROP
[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
;ActionList1=Repeat One,#Speed#,36
ActionList1=Repeat One,#Speed#,48
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1


;		butterflies ACTION TIMER
; 	RAINDROP
[MeasureEnd]
Measure=Calc
Formula=#Frame#
;IfCondition=(MeasureEnd=36)
IfCondition=(MeasureEnd=48)
IfTrueAction=[!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

;		butterflies ACTION TIMER
; 	RAINDROP
[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
X=(-200+50)
;X=-210
Y=60
DynamicVariables=1

;		butterflies ACTION TIMER
; 	RAINDROP
[MeterFrame]
Meter=STRING
MEasureName=Timer
X=(0+50)
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1#CRLF##Frame#
DynamicVariables=1
Hidden=1


;=========================================================
;	^	^	^	^
;	ACTION TIMER BUTTERFLY ANIMATION
;
;=========================================================





;---------------------------------------------
;
;
;	ROTATION lights
;---------------------------------------------


[option]
;[bg]
;Meter=Image
;ImageName=Center.png
;x=5
;y=5


[StartButton]
Meter=Button
SolidColor=0,0,0,1

ButtonImage=#SKINSPATH#\\CenterOrbBull\Startorb - ORIGINAL.png
;x=33
;y=33
;x=205
;	x=200
x=60
;	/////////////////////////////
;	MouseOverAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][Play "#@#select.wav"][!Redraw]
;MouseLeaveAction=[!Redraw]

; --------------------------OnUpdateAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter "MeterButterflies"][!Redraw][Play "#@#select.wav"][!Redraw]

;	/////////////////////////////


;	ImageName=#IconFull#
MouseOverAction=[!RainmeterShowMeter MeterSize][!Redraw]
MouseLeaveAction=[!RainmeterHideMeter MeterSize][!Redraw]
LeftMouseUpAction=[!RainmeterPluginBang "MeasureCount OpenBin"]
RightMouseUpAction=[!RainmeterPluginBang "MeasureCount EmptyBin"]
AntiAlias=1




;{}{}{{---------------------------------------------------------------------------




;		T	R	A	S	H
[MeterIconBackground]
Meter=Image
X=15
Y=27
W=19
H=26
SolidColor=255,255,255,1


;		T	R	A	S	H
[MeterIconEmpty]
Meter=Image
X=10
Y=20
W=#IconSize#
ImageName=#IconEmpty#
AntiAlias=1


;		T	R	A	S	H
[MeterIconFull]
Meter=Image
X=10
Y=20
W=#IconSize#








;----------------------------------------------	
;
;	size (kilobytes) indicator for trash bin items
;
;----------------------------------------------
;		T	R	A	S	H
[MeterSize]
Meter=String
MeasureName=MeasureSize
;	X=55
X=255
;X=360
Y=55
MeterStyle=Style
Text=%1Bytes
AutoScale=1
NumOfDecimals=1
Hidden=1


;----------------------------------------------	
;
;	number of items in the recycling bin
;		number location position
;----------------------------------------------

;		T	R	A	S	H
[MeterCount]
Meter=String
MeasureName=MeasureCount
;X=r
;Y=(13)r
X=255
Y=90

MeterStyle=Style
Text=%1





;x=93
;y=93
Hidden=0
;	ButtonCommand=!Execute ["#SKINSPATH#\\CenterOrbBull\openstartmenu.exe"]
;	ButtonCommand=!TrayMenu ["#SKINSPATH#\\CenterOrbBull\Rainmeter.exe"]








;=============================================
;
;	ROTATIO LIGHTS
;	V	V	V	V
;=============================================

;	/////////////////////////////

[MeasureTime]
Measure=Calc
Formula=MeasureTime1 * 10

[MeasureTime1]
Measure=Time
AverageSize=10

[MeterUnder6]
MeasureName=MeasureTime
Meter=ROTATOR
;	/////////////////////////////
; 	green dark glow round rotating
x=100
;	/////////////////////////////

;X=40
Y=45
W=1
H=1

;X=91
;Y=130
;W=94
;H=54

;X=91
;Y=91
;W=94
;H=94

ImageName=Point1.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=110
OffsetX=67
OffsetY=67
;UpdateDivider=100







[MeterUnder7]
MeasureName=MeasureTime
Meter=ROTATOR
;X=41
;Y=41
;W=194
;H=194

;X=11
;Y=11
;x=2
y=2
W=94
H=94
;	/////////////////////////////
; 	yellow/white glow round rotating
x=50
;	/////////////////////////////


ImageName=Point2.png
StartAngle=6.2831853
RotationAngle=-6.2831853
ValueReminder=130
OffsetX=47
OffsetY=47

;OffsetX=97
;OffsetY=97
;UpdateDivider=100

[MeterUnder8]
MeasureName=MeasureTime
Meter=ROTATOR
;X=41
;Y=41
;W=194
;H=194

;	/////////////////////////////
; 	light blue glow round rotating
x=77
;	/////////////////////////////

;X=11
;Y=11
x=29
y=49
W=40
D=50

ImageName=Point6.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=130
OffsetX=87
OffsetY=87

;OffsetX=97
;OffsetY=97
;UpdateDivider=100

-----------------------------------------------------------------------------------------












;-----------------------------------------------------------------------------------------

;	RECYCLING BIN

;--------------------------------------------------------------------------------------


;\\\\\\\\\\\\\\\\\\\\\\\\[Meter]
;Meter=Image
;ImageName=#@#Full.png
;W=50
;H=50
;\\\\\\\\\\\\\\\\\\\\\\\\[Meter]



[Variables]

[Meter]
IconSize=32
IconEmpty=#@#Empty.png
IconFull=#@#Full.png
;IconFull=#@#ABC.png



;----------------------------------------------	
;
;	align number indicator for recycling bin
;		number font size as well
;----------------------------------------------

[Style]
StringAlign=Right
;StringAlight=Center
InlineSetting=Face | Roboto
;	InlineSetting2=Size | 9
InlineSetting2=Size | 12
InlineSetting3=Color | 255,255,255,255
AntiAlias=1



[MeasureCount]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Count
Drives=All


;----------------------------------------------	
;
;	number of items in the recycling bin
;
;----------------------------------------------

[MeasureSize]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Size
Drives=All


;{}}{{}}{}{--------------------------------------------------------------------------------



;				T R A S H    B I N 

[MeasureAction]
Measure=Calc
IfCondition=MeasureCount > 0


; True 	FULL
;IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter MeterButterflies"][!RainmeterHideMeter MeterIconEmpty][!RainmeterShowMeter MeterIconFull][!RainmeterShowMeter MeterCount][!ShowMeter MeterUnder6][!ShowMeter MeterUnder7][!ShowMeter MeterUnder8]
;	IfTrueAction=[!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter MeterButterflies"][!RainmeterHideMeter MeterIconEmpty][!RainmeterShowMeter MeterIconFull][!RainmeterShowMeter MeterCount][!ShowMeter MeterUnder6][!ShowMeter MeterUnder7][!ShowMeter MeterUnder8]

IfTrueAction=[!ActivateConfig "0. Newman" "Newman-Seinfeld.ini"][!CommandMeasure MeasureSlider "Execute 1"][!ShowMeter MeterButterflies"][!HideMeter MeterIconEmpty][!ShowMeter MeterIconFull][!ShowMeter MeterCount][!ShowMeter MeterUnder6][!ShowMeter MeterUnder7][!ShowMeter MeterUnder8][!Update]



; False	EMTPY 
;	IfFalseAction=[!HideMeter "MeterButterflies"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure Timer "Stop 1"][!CommandMeasure MeasureEnd "Execute 1"][!HideMeter MeterIconFull][!ShowMeter MeterIconEmpty][!HideMeter MeterCount][!HideMeter MeterUnder6][!HideMeter MeterUnder7][!HideMeter MeterUnder8][!Redraw]

IfFalseAction=[!DeactivateConfig "0. Newman"][!HideMeter "MeterButterflies"][!DisableMeasure MeasureSlider][!DisabledMeasure Timer][!CommandMeasure MeasureEnd "Execute 1"][!HideMeter MeterIconFull][!ShowMeter MeterIconEmpty][!HideMeter MeterCount][!HideMeter MeterUnder6][!HideMeter MeterUnder7][!HideMeter MeterUnder8][!Redraw]

;__Just A Bin (Animation)\Roating TR o r a n g e2.ini"

;		[!PauseMeasure MeasureSlider][!CommandMeasure MeasureEnd "Execute 1"]
;		[!Hide MeterButterflies]
;	xxxxx [!CommandMeasure MeasureSlider "Stop 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!HideMeter "MeterButterflies"][!Redraw]
;[!PauseMeasure MeasureSlider][!PauseMeasure Timer]
;[!PauseMeasure MeasureSlider][!PauseMeasure Timer]
;[!CommandMeasure MeasureEnd "Execute 1"]


;{}}{{}}{}{--------------------------------------------------------------------------------


;		T	R	A	S	H

;		T	R	A	S	H
;	[MeterIconBackground]
;	Meter=Image
;	X=15
;	Y=27
;	W=19
;	H=26
;	SolidColor=255,255,255,1



;		T	R	A	S	H
;	[MeterIconEmpty]
;	Meter=Image
;	X=10
;	Y=20
;	W=#IconSize#
;	ImageName=#IconEmpty#
;	AntiAlias=1


;		T	R	A	S	H
;	[MeterIconFull]
;	Meter=Image
;	X=10
;	Y=20
;	W=#IconSize#

;		T	R	A	S	H
;	ImageName=#IconFull#
;	MouseOverAction=[!RainmeterShowMeter MeterSize][!Redraw]
;	MouseLeaveAction=[!RainmeterHideMeter MeterSize][!Redraw]
;	LeftMouseUpAction=[!RainmeterPluginBang "MeasureCount OpenBin"]
;	RightMouseUpAction=[!RainmeterPluginBang "MeasureCount EmptyBin"]
;	AntiAlias=1


;		T	R	A	S	H
;	[MeterSize]
;	Meter=String
;	MeasureName=MeasureSize
;	X=55
;	Y=0
;	MeterStyle=Style
;	Text=%1B
;	AutoScale=1
;	NumOfDecimals=1
;	Hidden=1


;		T	R	A	S	H
;	[MeterCount]
;	Meter=String
;	MeasureName=MeasureCount
;	X=r
;	Y=(13)r
;	MeterStyle=Style
;	Text=%1


-------------------------------------------------------------------
BONUS Concept that I would like to implement (maybe, may be not, not sure yet):
Recycle bin plays animations when the trash bin is full (or has something in it).
Bonus points: Different types of image (or animation) playing depending on how many items are in the recycling bin.
Example:
1) Animation 1 plays (or image 1 displays) when Recycle bin has less than 50 items
2) Animation 2 plays (or image 2 displays) when recycle bin has 51 to 100 items
3) Animation 3 plays (or image 2 displays) when recycle bin has 101 to 200 items
, etc, etc

and obviously, end the animation when the trash bin is emptied out at each of those ranges.

What's the 'proper way' to get a never ending actiontimer loop where the user him/herself would terminate the loop?

My thought process is to possibly use ifcondition for each situation.



=================================================================
=================================================================

EDIT ONE: I'm going to try the following code [post up top by you) to see if it'll work for the following scenario that I want to do. If it doesn't work, (or I can't figure out how to make it work), I'll post again. Hopefully the following code will allow me to "fix" my actiontimer animation in the video below. Hopefully the actiontimer animation loop doesn't 'blink' with the wait periods.

Code: Select all

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #SlidingUpdate#
ActionList2=Slide | Wait #SlidingUpdate# | Rerun | Wait #SlidingUpdate#
Slide=[!SetVariable SlidingOffset (#SlidingOffset#-#CurrentStep#)][!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1
EDIT TWO: How do I do this [!SetVariable SlidingOffset (#SlidingOffset#-#CurrentStep#)]. The other thing I should have mentioned is that I can simply use ActivateConfig another skin (skin with the water drop animation ) and that'll 'solve' the Actiontime animation issues, but if I do it this way, when I drag the start-orb, the water drop skin won't move because they aren't linked together.
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by strawberryshortcake »

EDIT: Unfortunately this code eventually (code is in the spoiler tag) crashes even when I emptied out the recycling bin ...at least one time ..two times.... three times now. I'll have to keep monitor on it. :handtohead: :twisted: Got to find another way to make things work.
I'll have to try to figure out how to make the one at bottom of my post work. Haven't figure it out yet.


So I did managed to find a code that keeps an actiontimer animation looped for my recycling bin. The downside is that the animation eventually freezes when I tried it as a standalone code using butterflies. Need to find a way to prevent that.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
OnRefreshAction=[!CommandMeasure MeasureSlider "Execute 1"][!Redraw]

[Variables]
Frame=0
Speed=50
U=[!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!UpdateMeter "MeterButterflies"][!UpdateMeter "MeterFrame"][!Redraw]

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat One,#Speed#,33
One=[!SetVariable Frame "(#Frame#+1)"]#U#
DynamicVariables=1

[MeasureEnd]
Measure=Calc
Formula=#Frame#
IfCondition=(MeasureEnd=33)
IfTrueAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"][!SetVariable Frame "0"][!UpdateMeasure "MeasureSlider"][!UpdateMeasure "MeasureEnd"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
X=0
Y=0
DynamicVariables=1



[MeterFrame]
Meter=STRING
MEasureName=Timer
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1#CRLF##Frame#
DynamicVariables=1
Hidden=1
I tried that first because it closely matches the actiontimer code that I am already using. I still haven't figured out how to get the below code working in my skin. Plus I think it might be better to prevent rainmeter crashes.


I have to figure out how to get the following code to work because I think this will avoid any crashes like the one up top.

'wait' code:

Code: Select all

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #SlidingUpdate#
ActionList2=Slide | Wait #SlidingUpdate# | Rerun | Wait #SlidingUpdate#
Slide=[!SetVariable SlidingOffset (#SlidingOffset#-#CurrentStep#)][!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by Yincognito »

strawberryshortcake wrote: October 13th, 2020, 9:23 amI have to figure out how to get the following code to work because I think this will avoid any crashes like the one up top.

'wait' code:

Code: Select all

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #SlidingUpdate#
ActionList2=Slide | Wait #SlidingUpdate# | Rerun | Wait #SlidingUpdate#
Slide=[!SetVariable SlidingOffset (#SlidingOffset#-#CurrentStep#)][!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1
Yes, that's the idea. The thing is that you don't have to take this literally, as I just copy pasted it from my codes. The #SlidingUpdate# is just a variable like any other, and has no other special meaning other than specifying a wait time - so you can replace it with any other similar variable, like #Speed# in your case, or a hardcoded value like 3 or 5 or whatever (milliseconds). Similarly, you can replace the bangs in the Slide action with your own, like, say, [!SetVariable Frame "(#Frame#+1)"]#U# in your case.

Thus, executing ActionList1 (or Slide, or [!CommandMeasure MeasureSlider "Execute 1"]) will run a single animation step, while executing ActionList2 (or Rerun, or [!CommandMeasure MeasureSlider "Execute 2"]) will run that animation step forever. The former was needed in my case, as I also do some scroll triggered animation and that requires just one animation step to be run at a time, so you can remove it if you really want to and replace it with what is now the 2nd action. Obviously, each execution should be preceded by stopping both actions beforehand.

I'll take a look at your specific code later on in order to integrate it there, although you have all the "methodology" explained above so with a little care you can even do it yourself.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by Yincognito »

Yincognito wrote: October 13th, 2020, 11:56 amI'll take a look at your specific code later on in order to integrate it there, although you have all the "methodology" explained above so with a little care you can even do it yourself.
There you go:

Code: Select all

[Variables]
Frame=0
FrameCount=36
Speed=50
U=[!UpdateMeasure MeasureSlider][!UpdateMeter MeterButterflies][!UpdateMeter MeterFrame][!Redraw]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,1

---Measures---

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #Speed#
ActionList2=Slide | Wait #Speed# | Rerun | Wait #Speed#
Slide=[!SetVariable Frame ((#Frame#+1)%#FrameCount#)]#U#
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1

---Meters---

[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
UpdateDivider=-1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
MiddleMouseUpAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"]
DynamicVariables=1

[MeterFrame]
Hidden=0
Meter=String
X=([MeterButterflies:W]/2)r
FontFace=Segoe UI
FontSize=8
FontWeight=700
StringAlign=Center
FontColor=220,220,220,255
SolidColor=0,0,0,150
AntiAlias=1
Text="Frame#CRLF##Frame#"
UpdateDivider=-1
DynamicVariables=1
This should run the animation endlessly on left click, pause it on middle click, and not cause any freeze (at least it doesn't in my case, after 7 minutes playing it).

That being said, be aware that the larger the image (or the area) used in an animation, the higher the CPU usage as a result. Therefore, UpdateDivider=-1 is highly recommended for whatever measure or meter that doesn't require fast updating or that is updated or redrawn by the ActionTimer measure itself. Even so, sometimes a higher CPU usage can't be avoided because Rainmeter itself is redrawing the skin on the screen, probably idependent of any Update or UpdateDivider, so, if you have a 500x500 px skin and the animation happening only on a 50x50 px somewhere on that 500x500 px area, it pays to "break" the skin into a "static" 500x500px skin and an animated 50x50 px one, as only the latter will be redrawn by Rainmeter on a fast rate, thus saving CPU. Of course, when doing the separation, moving the 2 skins at the same time and generally creating the illusion that they are a single skin for the user is going to be a problem, even though in theory DragGroups exist in Rainmeter, although unfortunately on a manual basis. Currently, such an issue doesn't have a satisfactory solution, as Rainmeter's !Redraw bang acts on a skin (and not on a meter) basis, since the skin is the smallest "graphical unit" in Rainmeter, so to speak.
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: HELP: ActionTimer. Is it possible to STOP the completion of the ActionList1 on a second mouseover action?

Post by strawberryshortcake »

Yincognito wrote: October 13th, 2020, 11:56 am
Yes, that's the idea. The thing is that you don't have to take this literally, as I just copy pasted it from my codes. The #SlidingUpdate# is just a variable like any other, and has no other special meaning other than specifying a wait time - so you can replace it with any other similar variable, like #Speed# in your case, or a hardcoded value like 3 or 5 or whatever (milliseconds). Similarly, you can replace the bangs in the Slide action with your own, like, say, [!SetVariable Frame "(#Frame#+1)"]#U# in your case.
Thus, executing ActionList1 (or Slide, or [!CommandMeasure MeasureSlider "Execute 1"]) will run a single animation step, while executing ActionList2 (or Rerun, or [!CommandMeasure MeasureSlider "Execute 2"]) will run that animation step forever. The former was needed in my case, as I also do some scroll triggered animation and that requires just one animation step to be run at a time, so you can remove it if you really want to and replace it with what is now the 2nd action. Obviously, each execution should be preceded by stopping both actions beforehand.
I'll take a look at your specific code later on in order to integrate it there, although you have all the "methodology" explained above so with a little care you can even do it yourself.
End goal: The video looks exactly like how I want things to work, but I don't think the code is 'syntax efficient'.
Some points about the video:
1. First part of the video. Mouseoveraction on the empty trashcan triggers the raindrop animation sequence. It plays one time and stop. This is a good thing but it uses a 'simple animation'. I would rather use an ActionTimer. I tried mouseoveraction=[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"] but it doesn't work.

2. When I placed the 49ers picture into the trashcan, it triggers the three spherical colored lights and continuous raindrop. Rainmeter Update is set to 50 to make number #1 work realistically, but it also causes the three spheres to pauses at certain points. When Update=100, the sphere's move at the constant and correct speed.

3. When I empty the trashcan, three spheres are gone and the raindrops are gone -- both of these is exactly how I want it. I'll have to figure out a way to make them fade in and fade out (but I'm certain that rainmeter doesn't can't do that).

4. When the trash is FULL, and I mouse over it, the raindrops are still continuous. (This is a good thing).

So basically, the video shows exactly how I want the animation sequence to work. But I don't think the code is "syntax efficient". It's using an additional 'simple animation' plus actiontimer animation to accomplish. I was thinking that maybe I could have done what you suggested with Execute 1 to accomplish that moveoveraction, but for whatever reason, the code just doesn't seem to want to respond.


FULL CODE also IN ZIP and 7zip file:

Code: Select all

[Rainmeter]
Author=Yincognito, Just A Bin
Update=100
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,1


[Variables]
startbuttonpositionX=22
startbuttonpositionY=30
GreenSphere_X=43
GreenSphere_Y=70
WhiteSphere_X=20
WhiteSphere_Y=10
BlueSphere_X=50
BlueSphere_Y=70


Frame=0
FrameCount=48
Speed=75
U=[!UpdateMeasure MeasureSlider][!UpdateMeter MeterButterflies][!UpdateMeter MeterFrame][!Redraw]


---Measures---

;================================

;	MEASURE SLIDER
;================================

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer

ActionList1=Slide | Wait #Speed#
ActionList2=Slide | Wait #Speed# | Rerun | Wait #Speed#
Slide=[!SetVariable Frame ((#Frame#+1)%#FrameCount#)]#U#
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1


---Meters---

;================================

;	METERBUTTERFLIES
;================================

[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
UpdateDivider=-1
DynamicVariables=1
x=6
y=70

[MeasureAction]
Measure=Calc
IfCondition=MeasureCount > 0
IfTrueAction=[!ShowMeter MeterButterflies][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"][!RainmeterHideMeter MeterIconEmpty][!RainmeterShowMeter MeterIconFull][!RainmeterShowMeter MeterCount][!ShowMeter MeterUnder6][!ShowMeter MeterUnder7][!ShowMeter MeterUnder8]
IfFalseAction=[!HideMeter MeterUnder6][!HideMeter MeterUnder7][!HideMeter MeterUnder8][!HideMeter MeterButterflies][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!RainmeterHideMeter MeterIconFull][!RainmeterShowMeter MeterIconEmpty][!RainmeterHideMeter MeterCount]

IfMatch=(IfCondition=MeasureCount >0)
IfMatchAction=mouseoveractio




;================================

;	METER FRAME
;================================

[MeterFrame]
Hidden=1
Meter=String
X=([MeterButterflies:W]/2)r
FontFace=Segoe UI
FontSize=8
FontWeight=700
StringAlign=Center
FontColor=220,220,220,255
SolidColor=0,0,0,150
AntiAlias=1
Text="Frame#CRLF##Frame#"
UpdateDivider=-1
DynamicVariables=1




;================================

[Metadata]
;Name=Just a Bin
;Author=MixSilmeria
;Version=Scrap (1.0)
;License=Creative Commons BY-NC-SA 3.0
;Information=Simple recycle bin skin. Made it with love, from Argentina <3

;	TRASH BIN RECYCLE BIN MERGE (FROM JUST A BIN)
;================================


[Variables]
IconSize=32
IconEmpty=#@#Empty.png
IconFull=#@#Full.png

[Style]
StringAlign=Right
InlineSetting=Face | Roboto
InlineSetting2=Size | 9
InlineSetting3=Color | 255,255,255,255
AntiAlias=1

[MeasureCount]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Count
Drives=All

[MeasureSize]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=Size
Drives=All



;================================

;	TRASH BIN RECYCLE BIN count & size (FROM JUST A BIN)
;================================

[MeterSize]
Meter=String
MeasureName=MeasureSize
X=55
Y=0
MeterStyle=Style
Text=%1B
AutoScale=1
NumOfDecimals=1
Hidden=1

[MeterCount]
Meter=String
MeasureName=MeasureCount
X=r
Y=(13)r
MeterStyle=Style
Text=%1

;================================

;	TRASH BIN RECYCLE BIN count & size (FROM JUST A BIN)
;================================

[StartButton]
Meter=Button
;ButtonImage=#SKINSPATH#\\CenterOrbBull\Startorb - ORIGINAL.png
ButtonImage=StartorbGREEN.png
SolidColor=0,0,0,1
x=#startbuttonpositionX#
y=#startbuttonpositionY#



;MouseOverAction=[Play "#@#select.wav"][!ShowMeter MeterSize][!ShowMeter MeterCount][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"]

MouseOverAction=[Play "#@#select.wav"][!UnpauseMeasure "MeasureNumberCalc"]
MouseLeaveAction=[!HideMeter MeterSize][!HideMeter MeterCount][!Redraw]
RightMouseUpAction=[!PluginBang "MeasureCount EmptyBin"][Play "#@#WaterFlush.wav"]
AntiAlias=1



;		ButtonCommand=!TrayMenu ["#SKINSPATH#\\CenterOrbBull\Rainmeter.exe"]
;		MouseOverAction=!TrayMenu ["#SKINSPATH#\\CenterOrbBull\Rainmeter.exe"][Play "#@#select.wav"][!RainmeterShowMeter MeterSize][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"][!RainmeterShowMeter MeterCount][!Redraw]




;==============================================
;	SIMPLE ANIMATION	START

;	This section is implemented because I couldn't
;	get the actiontimer animation to work with mouseover
; 	when the trashbin is already full (when full
;	the trashbin has it's only set of actiontimer animation).
;	when trashbin is emptied, it terminates that same actiontimer
;	animation.)
s
;	The addition of the following allows me to do 
;	exactly what I picture the recycling bin doing a second set
;	of animation WITHOUT completely clearing off it's first set
;	of animation, but it would probably be better if I could 
;	somehow remove this section and use the actiontimer entirely. 
;	
;	However, the use of this section also requires me 
;	to change Raimeter's update to 50 (Update=50). SO 
; 	I'm not sure if that's efficient or not. Probably not.

;==============================================


[MeasureNumberCalc]
Measure=Calc
Formula=(( MeasureNumberCalc + 1 ) % 48 )
IfCondition=(MeasureNumberCalc=0)
IfTrueAction=[!PauseMeasure "MeasureNumberCalc"]
Paused=1

[MeterBG]
Meter=Image
ImageName=#@#tmp-[MeasureNumberCalc].png
X=5
Y=70
DynamicVariables=1
;MouseOverAction=[!UnpauseMeasure "MeasureNumberCalc"]

;==============================================
;	SIMPLE ANIMATION	END
;==============================================





;==============================================
;	DEFAULT JUST A BIN VALUES	START
;==============================================
[MeterIconBackground]
Meter=Image
X=15
Y=27
W=19
H=26
SolidColor=255,255,255,1

[MeterIconEmpty]
Meter=Image
X=10
Y=20
W=#IconSize#
ImageName=#IconEmpty#
AntiAlias=1

[MeterIconFull]
Meter=Image
X=10
Y=20
W=#IconSize#


[MeterSize]
Meter=String
MeasureName=MeasureSize
X=55
Y=0
MeterStyle=Style
Text=%1B
AutoScale=1
NumOfDecimals=1
Hidden=1

[MeterCount]
Meter=String
MeasureName=MeasureCount
X=r
Y=(13)r
MeterStyle=Style
Text=%1
;==============================================
;	DEFAULT JUST A BIN VALUES	END
;==============================================




;===========================================================
;===========================================================
;===========================================================
;		ROTATIONAL SPHERES SECTION	- START
;===========================================================
;===========================================================
;===========================================================

;=============================================
;
;	ROTATION SPHERE'S GREEN,WHITE,BLUE
;	V	V	V	V
;=============================================

[MeasureTime]
Measure=Calc
Formula=MeasureTime1 * 12
[MeasureTime1]
Measure=Time
AverageSize=10


;=============================================
;/////////////////////////////
;	ROTATIONAL SPHERE #GREEN
;/////////////////////////////
;=============================================


[MeterUnder6]
MeasureName=MeasureTime
Meter=ROTATOR
W=1
H=1
;x=100
;y=70
X=#GreenSphere_X#
Y=#GreenSphere_Y#


;------Point1.png is the image representating the green sphere
ImageName=Point1.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=110
OffsetX=67
OffsetY=67


;=============================================
;/////////////////////////////
;	ROTATIONAL SPHERE #WHITE
;/////////////////////////////
;=============================================

[MeterUnder7]
MeasureName=MeasureTime
Meter=ROTATOR
;y=50
W=94
H=94
;x=40
;y=10

X=#WhiteSphere_X#
Y=#WhiteSphere_Y#

;------Point2.png is the image representating the white sphere
ImageName=Point2.png
StartAngle=6.2831853
RotationAngle=-6.2831853
ValueReminder=130
OffsetX=47
OffsetY=47

;OffsetX=97
;OffsetY=97
;UpdateDivider=100

;=============================================
;/////////////////////////////
;	ROTATIONAL SPHERE #BLUE
;/////////////////////////////
;=============================================

[MeterUnder8]
MeasureName=MeasureTime
Meter=ROTATOR
;x=29
;y=49
;y=100

X=#BlueSphere_X#
Y=#BlueSphere_Y#

W=40
D=50
;x=70
;y=50
;-------Point6.png is the image representating the blue sphere
ImageName=Point6.png
StartAngle=6.2831853
RotationAngle=6.2831853
ValueReminder=130
OffsetX=87
OffsetY=87

;===========================================================
;===========================================================
;===========================================================
		ROTATIONAL SPHERES SECTION	- END
;===========================================================
;===========================================================
;===========================================================
Actiontimer vs 'Simple Animations'.
(A) The skin in the video uses both actiontimer and regular simple animations. The problem with simple animations is that they rely on [Rainmeter] Update. If the update=50, then they look realistic, but if update=1000, simple animations are too slow. The simple animation happens used in this skin happens when I mouseoveraction on the EMPTY trash can. Those three colored moving spheres require an Update=100 for smooth rotation.

(B) This is the code that I wanted to use when the trashcan is EMPTY to trigger one sequence of raindrop animation then stop, but for some reason it doesn't work.

Code: Select all

mouseoveraction=[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"]
(C) In order to achieve what I wanted. I had to implement the following code from this thread ( https://forum.rainmeter.net/viewtopic.php?t=21461 ... ) However, I don't think it's the best method because it relies on [Rainmeter]Update=50 to work in order for it to look realistic. The low update unfortunately causes the three spheres *(blue, green white)" to move with a hitch. These spheres require an [Rainmeter]Update=100 in order to be smooth.

Code: Select all

;==============================================
;	SIMPLE ANIMATION	START
;==============================================


[MeasureNumberCalc]
Measure=Calc
Formula=(( MeasureNumberCalc + 1 ) % 48 )
IfCondition=(MeasureNumberCalc=0)
IfTrueAction=[!PauseMeasure "MeasureNumberCalc"]
Paused=1

[MeterBG]
Meter=Image
ImageName=#@#tmp-[MeasureNumberCalc].png
X=5
Y=70
DynamicVariables=1
;MouseOverAction=[!UnpauseMeasure "MeasureNumberCalc"]

;==============================================
;	SIMPLE ANIMATION	END
;==============================================
Yincognito wrote: October 13th, 2020, 12:51 pm There you go:

Code: Select all

[Variables]
Frame=0
FrameCount=36
Speed=50
U=[!UpdateMeasure MeasureSlider][!UpdateMeter MeterButterflies][!UpdateMeter MeterFrame][!Redraw]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,1

---Measures---

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Slide | Wait #Speed#
ActionList2=Slide | Wait #Speed# | Rerun | Wait #Speed#
Slide=[!SetVariable Frame ((#Frame#+1)%#FrameCount#)]#U#
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
UpdateDivider=-1
DynamicVariables=1

---Meters---

[MeterButterflies]
Meter=Image
ImageName=#@#tmp-#Frame#.png
UpdateDivider=-1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]
MiddleMouseUpAction=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"]
DynamicVariables=1

[MeterFrame]
Hidden=0
Meter=String
X=([MeterButterflies:W]/2)r
FontFace=Segoe UI
FontSize=8
FontWeight=700
StringAlign=Center
FontColor=220,220,220,255
SolidColor=0,0,0,150
AntiAlias=1
Text="Frame#CRLF##Frame#"
UpdateDivider=-1
DynamicVariables=1
This should run the animation endlessly on left click, pause it on middle click, and not cause any freeze (at least it doesn't in my case, after 7 minutes playing it).

That being said, be aware that the larger the image (or the area) used in an animation, the higher the CPU usage as a result. Therefore, UpdateDivider=-1 is highly recommended for whatever measure or meter that doesn't require fast updating or that is updated or redrawn by the ActionTimer measure itself. Even so, sometimes a higher CPU usage can't be avoided because Rainmeter itself is redrawing the skin on the screen, probably idependent of any Update or UpdateDivider, so, if you have a 500x500 px skin and the animation happening only on a 50x50 px somewhere on that 500x500 px area, it pays to "break" the skin into a "static" 500x500px skin and an animated 50x50 px one, as only the latter will be redrawn by Rainmeter on a fast rate, thus saving CPU. Of course, when doing the separation, moving the 2 skins at the same time and generally creating the illusion that they are a single skin for the user is going to be a problem, even though in theory DragGroups exist in Rainmeter, although unfortunately on a manual basis. Currently, such an issue doesn't have a satisfactory solution, as Rainmeter's !Redraw bang acts on a skin (and not on a meter) basis, since the skin is the smallest "graphical unit" in Rainmeter, so to speak.
Good suggestion on the pixel size. I had to readjust my pixels for the drop width, so now that formula X+50 isn't needed anymore.

That code works great, but I tried to implement the "Execute 1" for when the trashcan is empty so it'll play the raindrop animation once (then disappear) but it didn't work. It didn't even start the raindrop animation when the trash can was empty unfortunately.

Code: Select all

MouseOverAction=[!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Execute 1"]
I'm going to rename this file and the quote that you helped me with as Yincognito when it's all complete. And I'll rename the ecletric tech's quote file as ecletric when it's all said and done. I keep misspelling ecletric-tech's username.




EDIT:
One thing I wanted to mentioned was that it would be best if I could get all the animations done with actiontimer instead of using the 'simple animation' (no, they're not really simple, I'm just using that to differentiate between actiontimer animations) because 'simple animations' in skins (that includes other functions rely on [Rainmeter]Update. Standard update=1000, and unfortunately most animations require update=50 or so to make it look realistic.
You do not have the required permissions to view the files attached to this post.
Last edited by strawberryshortcake on October 15th, 2020, 3:29 am, edited 7 times in total.