It is currently November 29th, 2020, 5:02 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
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 »

What I've got going in the video uses multiple photoshopped/gimped color variations of the same thing (inner circle ball, main primary inner liquid). But greyscale=1 and imagetint would obviously be better route if I could get it right.

1. The video/code showing the herky jerky movement pattern of the inner ball (changes color to match the liquid color, which matches the size of the recycle bin content) is the reason why I wanted to figure out how to get another ActionTimer animation going. I know the inner ball is simply useless aesthetics at this point.

Code: Select all

The code that deals with center ball's movement pattern -- herky jerky at the moment. 

[MeasureRotateColor01]
Measure=Calc
Formula=(MeasureRotateColor01 % 360) + #ColorSpeed#
MaxValue=360
Paused=1

[MeterRotateColor01]
Meter=Rotator
MeasureName=MeasureRotateColor01
;MeasureName=MeasureRotate

ImageName=#Color1#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1
2. I like the concept of using greyscale=1 and imagetint based on your changing color with each raindrop, but I tried applying it to the recycle bin measure count instead but I'm doing it wrong. I thought long and hard about where I should put the accompanying snippet of code that you mentioned above in order to get greyscale and imagetint correct for recycle bin size but couldn't manage.

something like this but not quite (I already deleted that portion of the code), but something about ImageTint not found.

Code: Select all

IfCondition=(MeasureBinSize=0)
IfTrueAction=[!SetVariable Button_Image (Greyscale=1 ImageTint 255,0,255,0][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor06][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor05][!HideMeter MeterRotateColor06]





NOTE: For anyone reading, don't use the following code. It's a messy code. I was just trying things out. Use the codes posted in Yincognito's replies.

Code: Select all

[Variables]
TriggerSlide=0
Cycle=0
Frame=0
FrameCount=48

SpheresAngle=0
SpheresAngleIncrement=3
Speed=75

BinIconSize=32
BinIconEmpty=#@#BinEmpty.png
BinIconFull=#@#BinFull.png

SphereSize=25
SphereRotationRadius=22

SphereWhite_X=([MeterStartButton:X]+[MeterStartButton:W]/2-20)
SphereWhite_Y=(#SphereSize#/2+#SphereRotationRadius#+10)
SphereBlue_X=([MeterStartButton:X]+[MeterStartButton:W]/2+20)
SphereBlue_Y=(#SphereSize#/2+#SphereRotationRadius#+10)
SphereGreen_X=([MeterStartButton:X]+[MeterStartButton:W]/2)
SphereGreen_Y=(#SphereSize#/2+#SphereRotationRadius#)

U=[!UpdateMeasure MeasurePlay][!UpdateMeasure MeasureSlider][!UpdateMeasure MeasureSpheresAngle][!UpdateMeter MeterStartButton][!UpdateMeasure MeasureBinSize][!UpdateMeter MeterRaindrops][!UpdateMeterGroup SpheresGroup][!Redraw]
Action1=[!SetVariable Cycle 0][!ShowMeter MeterBinIconEmpty][!HideMeter MeterBinIconFull][!HideMeter MeterBinCount][!HideMeter MeterSphereGreen][!HideMeter MeterSphereWhite][!HideMeter MeterSphereBlue][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]
Action2=[!SetVariable Cycle 0][!HideMeter MeterBinIconEmpty][!ShowMeter MeterBinIconFull][!ShowMeter MeterBinCount][!ShowMeter MeterSphereGreen][!ShowMeter MeterSphereWhite][!ShowMeter MeterSphereBlue][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]

Button_Image=#@#Images\Startorb - ORIGINAL GREY.png

;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;
;		COLOR ADDITIVES - color ball
;
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

;---- Changes the color of the inner ball color (to match the liquid color) depending on the size of the recycle bin contents
Color1=Point_Grey.png
Color2=Point_Blue.png
Color3=Point_Green.png
Color4=Point_Yellow.png
Color5=Point_Orange.png
Color6=Point_Red.png

;--- Changes the speed of the inner ball movement
ColorSpeed=10

;---- Changes the color of the inner liquid color depending on the size of recycle bin contents
ORB_LIQUIDCOLOR01=GREY
ORB_LIQUIDCOLOR02=BLUE
ORB_LIQUIDCOLOR03=GREEN
ORB_LIQUIDCOLOR04=YELLOW
ORB_LIQUIDCOLOR05=ORANGE
ORB_LIQUIDCOLOR06=RED

;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;
;		COLOR ADDITIVES
;
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$









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

---Measures---

[MeasurePlay]
Measure=Calc
UpdateDivider=-1
IfCondition=(#Frame#%12=8) && (#Cycle#<3)
;	Uncomment the line just below to revert back to default condition: Where every raindrop has a sound playing.
;	IfCondition=(#Frame#%12=8) && (#Cycle#>=0)
IfTrueAction=[!SetVariable Cycle (#Cycle#+1)][Play "#@#One Drip.wav"]
IfConditionMode=1
DynamicVariables=1

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Reset | Wait #Speed# | Repeat Slide,#Speed#,#FrameCount# | Wait #Speed#
ActionList2=Repeat Slide,#Speed#,#FrameCount# | Wait #Speed# | Rerun | Wait #Speed#
Reset=[!SetVariable Frame 0]#U#
Slide=[!SetVariable Frame ((#Frame#+1)%#FrameCount#)][!SetVariable SpheresAngle ((#SpheresAngle#+#SpheresAngleIncrement#)%360)]#U#
Rerun=[!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]


UpdateDivider=-1
DynamicVariables=1


[MeasureBinCount]
Group=RecycleGroup
Measure=RecycleManager
RecycleType=Count

[MeasureBinSize]
Group=RecycleGroup
Measure=RecycleManager
RecycleType=Size


;----------@;#GREY #1
;----------@;@ EMPTY
IfCondition=(MeasureBinSize=0)
IfTrueAction=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR01#.png"][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor06][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor05][!HideMeter MeterRotateColor06]


;----------@;#BLUE #2
;----------@;@ ANY AMOUNT in RECYCLE BIN
IfCondition2=(MeasureBinSize > 0) && (MeasureBinSize <= 134217728)
IfTrueAction2=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR02#.png"][!UnpauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor06][!ShowMeter MeterRotateColor02][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor05][!HideMeter MeterRotateColor06]


;----------@;#GREEN #3
;----------@;@ Quarter FULL
IfCondition3=(MeasureBinSize > 134217728) && (MeasureBinSize <= 268435456)
IfTrueAction3=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR03#.png"][!UnpauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor06][!ShowMeter MeterRotateColor03][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor05][!HideMeter MeterRotateColor06]
;----------@;-----@@ IfCondition3=(MeasureSize > 0) && (MeasureSize <= 268435456)

;----------@;#YELLOW #4
;----------@;@ HALF FULL
IfCondition4=(MeasureBinSize > 268435456) && (MeasureBinSize <= 536870912)
IfTrueAction4=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR04#.png"][!UnpauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor06][!ShowMeter MeterRotateColor04][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor05][!HideMeter MeterRotateColor06]


;----------@;#ORANGE #5
;----------@;@ THREE QUARTERS
IfCondition5=(MeasureBinSize > 536870912) && (MeasureBinSize <= 805306368)
IfTrueAction5=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR05#.png"][!UnpauseMeasure MeasureRotateColor05][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor06][!ShowMeter MeterRotateColor05][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor06]


;----------@;#RED #6
;----------@;@ FULL BIN
IfCondition6=MeasureBinSize > 805306368
IfTrueAction6=[!SetVariable Button_Image "#@#Images\Startorb - ORIGINAL #ORB_LIQUIDCOLOR06#.png"][!UnpauseMeasure MeasureRotateColor06][!PauseMeasure MeasureRotateColor01][!PauseMeasure MeasureRotateColor02][!PauseMeasure MeasureRotateColor03][!PauseMeasure MeasureRotateColor04][!PauseMeasure MeasureRotateColor05][!ShowMeter MeterRotateColor06][!HideMeter MeterRotateColor01][!HideMeter MeterRotateColor02][!HideMeter MeterRotateColor03][!HideMeter MeterRotateColor04][!HideMeter MeterRotateColor05]

OnUpdateAction=[!UpdateMeter MeterStartButton][!Redraw]



[MeasureAction]
Measure=Calc
Formula=(Sgn(MeasureBinCount)+1)
IfCondition=(MeasureBinCount=0)
IfTrueAction=[#Action[&MeasureAction]]
IfFalseAction=[#Action[&MeasureAction]]
IfCondition2=(#TriggerSlide#=1)
IfTrueAction2=[#Action[&MeasureAction]]
DynamicVariables=1

[MeasureSpheresAngle]
Measure=Calc
Formula=#SpheresAngle#
MinValue=0
MaxValue=360
UpdateDivider=-1
DynamicVariables=1

---Styles---

[Style]
StringAlign=Right
FontFace=Roboto
FontSize=9
FontColor=255,255,255,255
AntiAlias=1


;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;
;		COLOR ADDITIVES
;
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
---Meters---
[MeterStartButton]
Meter=Button
ButtonImage=#Button_Image#
SolidColor=0,0,0,1
X=15
AntiAlias=1
UpdateDivider=-1
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;
;		COLOR ADDITIVES
;
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


MouseOverAction=[!SetVariable TriggerSlide 1][!ShowMeter MeterBinSize][Play "#@#Bubble.wav"][!UpdateMeasure MeasureAction]
MouseLeaveAction=[!SetVariable TriggerSlide 0][!HideMeter MeterBinSize][!Redraw]
LeftMouseUpAction=[Play "#@#WaterFlush.wav"][!CommandMeasure MeasureBinCount "OpenBin"]
RightMouseUpAction=[Play "#@#WaterFlush.wav"][!CommandMeasure MeasureBinCount "EmptyBin"][!UpdateMeasureGroup RecycleGroup][!UpdateMeasure MeasureAction]
DynamicVariables=1


[MeterRaindrops]
Meter=Image
ImageName=#@#Raindrop-#Frame#.png
UpdateDivider=-1
DynamicVariables=1

[MeterBinIconEmpty]
Meter=Image
X=10
Y=20
W=#BinIconSize#
ImageName=#BinIconEmpty#
AntiAlias=1
UpdateDivider=-1

[MeterBinIconFull]
Meter=Image
X=10
Y=20
W=#BinIconSize#
ImageName=#BinIconFull#
AntiAlias=1
UpdateDivider=-1

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


[MeterBinCount]
Meter=String
MeterStyle=Style
X=0r
Y=13r
MeasureName=MeasureBinCount
Text=%1 file

[MeterSphereGreen]
Group=SpheresGroup
Meter=Rotator
X=#SphereGreen_X#
Y=#SphereGreen_Y#
ImageName=#@#SphereGreen.png
StartAngle=(-PI/2)
RotationAngle=(PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1

[MeterSphereWhite]
Group=SpheresGroup
Meter=Rotator
X=#SphereWhite_X#
Y=#SphereWhite_Y#
ImageName=#@#SphereWhite.png
StartAngle=(-PI/2+PI/3)
RotationAngle=(-PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1

[MeterSphereBlue]
Group=SpheresGroup
Meter=Rotator
X=#SphereBlue_X#
Y=#SphereBlue_Y#
ImageName=#@#SphereBlue.png
StartAngle=(-PI/2-PI/3)
RotationAngle=(PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1







;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
;
;		COLOR ADDITIVES - Inside single sphere
;
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

[MeasureRotateColor01]
Measure=Calc
Formula=(MeasureRotateColor01 % 360) + #ColorSpeed#
MaxValue=360
Paused=1


[MeterRotateColor01]
Meter=Rotator
MeasureName=MeasureRotateColor01
;MeasureName=MeasureRotate

ImageName=#Color1#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1

[MeasureRotateColor02]
Measure=Calc
Formula=(MeasureRotateColor02 % 360) + #ColorSpeed#
MaxValue=360
Paused=1

[MeterRotateColor02]
Meter=Rotator
MeasureName=MeasureRotateColor02
;MeasureName=MeasureRotate

ImageName=#Color2#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1


[MeasureRotateColor03]
Measure=Calc
Formula=(MeasureRotateColor03 % 360) + #ColorSpeed#
MaxValue=360
Paused=1

[MeterRotateColor03]
Meter=Rotator
MeasureName=MeasureRotateColor03
;MeasureName=MeasureRotate

ImageName=#Color3#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1



[MeasureRotateColor04]
Measure=Calc
Formula=(MeasureRotateColor04 % 360) + #ColorSpeed#
MaxValue=360
Paused=1

[MeterRotateColor04]
Meter=Rotator
MeasureName=MeasureRotateColor04
;MeasureName=MeasureRotate

ImageName=#Color4#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1


[MeasureRotateColor05]
Measure=Calc
Formula=(MeasureRotateColor05 % 360) + #ColorSpeed#
MaxValue=360
Paused=1


[MeterRotateColor05]
Meter=Rotator
MeasureName=MeasureRotateColor05
;MeasureName=MeasureRotate

ImageName=#Color5#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1


[MeasureRotateColor06]
Measure=Calc
Formula=(MeasureRotateColor06 % 360) + #ColorSpeed#
MaxValue=360
Paused=1


[MeterRotateColor06]
Meter=Rotator
MeasureName=MeasureRotateColor06
;MeasureName=MeasureRotate

ImageName=#Color6#
x=60
y=40
;OffsetX=(#ImageW# / 2)
;OffsetY=(#ImageH# / 2)
W=#ImageW#
H=#ImageH#
updateDivider=2
Hidden=1





Last edited by strawberryshortcake on October 18th, 2020, 9:59 pm, edited 1 time in total.
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 18th, 2020, 8:34 amIncredible work as usual. Your username fits you well. You're like a superstar coding genius.
Yeah, me and Bill are buddies, LMAO. Bill Gates, of course, not Bill Clinton. :lol:

A: Well, it's not much to wrap your head around, really. The syntax and the examples are there in the manual, and the specifics always depend on context, there's not a fixed "formula" for it. Generally, assuming you have the appropriate options set to the variables controlling the animation in your other measures/meters and the update variable (i.e. #U#) or bangs sequence is correctly updating and redrawing things, simultaneously is just about adding the change of the variable (i.e. !SetVariable) controlling the other animation(s) to your main repeating sequence in the AT measure along the already existing one(s), and sequentially is about adding the other actions after the | delimiter, in the desired action list(s). Otherwise, if the animations are not connected in any way, it's about replicating the existing AT measure to a new one and modifying it according to your needs.

B: Not sure you understood this properly. I'm not changing any sound file duration anywhere - Rainmeter can't do that. I'm just playing the same sound file for a limited number of times (or cycles), that's all.

C: Sure, it's more suited as a bin size indicator - I never disagreed with that. The only reason why I did this for the raindrops and not the bin size is because - again - I do NOT use the bin at all, so it never gets to more than 0 Bytes for me (although I had to enable it to be able to test the previous versions of the code), therefore it was much easier for me to test with the raindrops than by finding the files needed to make the recycle bin of a certain size. That being said, although I like to work on this and such, the main purpose of the thread is hopefully to make YOU understand and be able to do more by yourself. The only way one can do this is by experimenting yourself, and by this I don't mean copy pasting stuff, but actually modifying things on your own and try to find the best solutions to achieve something, in practice. For example, although the code you posted earlier was messy and had redundant parts, I actually liked the fact that you managed to make it functional in the sense of having the expected behavior - that's the way to go. It's not only about being creative from an artistic point of view, it's about being creative from a coding point of view as well. More compact solutions will come, in time - you can't expect this to happen overnight. I'll tell you a "secret": it's not a coincidence that people trying to help here prefer to post simple examples built from the ground up (i.e. from 0) when demonstrating ahievement of a certain goal: the code is much cleaner this way and makes the job easier for the coder, as he doesn't have to manipulate entirely different parts taken from somewhere, that may or may not have conflicting behaviors, variables, or generally requiring some effort to integrate everything into a functional and logical whole.

Anyway, back to the code:

Code: Select all

[Variables]
TriggerSlide=0
Cycle=0
Frame=0
FrameCount=48
SpheresAngle=0
SpheresAngleIncrement=3
Speed=75
BinIconSize=32
BinIconEmpty=#@#BinEmpty.png
BinIconFull=#@#BinFull.png
OrbIndex=0
OrbTint0=128,128,128,255
OrbTint1=0,0,255,255
OrbTint2=0,255,0,255
OrbTint3=255,255,0,255
OrbTint4=255,128,0,255
OrbTint5=255,0,255,255
OrbTint6=255,0,0,255
SphereSize=25
SphereRotationRadius=22
SphereWhite_X=([MeterStartButton:X]+[MeterStartButton:W]/2-20)
SphereWhite_Y=(#SphereSize#/2+#SphereRotationRadius#+10)
SphereBlue_X=([MeterStartButton:X]+[MeterStartButton:W]/2+20)
SphereBlue_Y=(#SphereSize#/2+#SphereRotationRadius#+10)
SphereGreen_X=([MeterStartButton:X]+[MeterStartButton:W]/2)
SphereGreen_Y=(#SphereSize#/2+#SphereRotationRadius#)
U=[!UpdateMeasure MeasurePlay][!UpdateMeasure MeasureSlider][!UpdateMeasure MeasureSpheresAngle][!UpdateMeter MeterRaindrops][!UpdateMeterGroup SpheresGroup][!Redraw]
Action1=[!SetVariable Cycle 0][!ShowMeter MeterBinIconEmpty][!HideMeter MeterBinIconFull][!HideMeter MeterBinCount][!HideMeter MeterSphereGreen][!HideMeter MeterSphereWhite][!HideMeter MeterSphereBlue][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 1"]
Action2=[!SetVariable Cycle 0][!HideMeter MeterBinIconEmpty][!ShowMeter MeterBinIconFull][!ShowMeter MeterBinCount][!ShowMeter MeterSphereGreen][!ShowMeter MeterSphereWhite][!ShowMeter MeterSphereBlue][!CommandMeasure MeasureSlider "Stop 1"][!CommandMeasure MeasureSlider "Stop 2"][!CommandMeasure MeasureSlider "Execute 2"]

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

---Measures---

[MeasurePlay]
Measure=Calc
UpdateDivider=-1
IfCondition=(#Frame#%12=8) && (#Cycle#<3)
IfTrueAction=[!SetVariable Cycle (#Cycle#+1)][Play "#@#WaterDrop.wav"]
IfConditionMode=1
DynamicVariables=1

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

[MeasureBinCount]
Group=RecycleGroup
Measure=RecycleManager
RecycleType=Count

[MeasureBinSize]
Group=RecycleGroup
Measure=RecycleManager
RecycleType=Size
OnUpdateAction=[!SetVariable OrbIndex (Sgn([MeasureBinSize:])*Clamp((Ceil(Ln([MeasureBinSize:])/Ln(2))-27),1,6))][!UpdateMeter MeterStartButton]
DynamicVariables=1

[MeasureAction]
Measure=Calc
Formula=(Sgn(MeasureBinCount)+1)
IfCondition=(MeasureBinCount=0)
IfTrueAction=[#Action[&MeasureAction]]
IfFalseAction=[#Action[&MeasureAction]]
IfCondition2=(#TriggerSlide#=1)
IfTrueAction2=[#Action[&MeasureAction]]
DynamicVariables=1

[MeasureSpheresAngle]
Measure=Calc
Formula=#SpheresAngle#
MinValue=0
MaxValue=360
UpdateDivider=-1
DynamicVariables=1

---Styles---

[Style]
StringAlign=Right
FontFace=Roboto
FontSize=9
FontColor=255,255,255,255
AntiAlias=1

---Meters---

[MeterStartButton]
Meter=Button
ButtonImage=#@#StartOrbGreen.png
X=15
AntiAlias=1
Greyscale=1
ImageTint=[#OrbTint[#OrbIndex]]
UpdateDivider=-1
MouseOverAction=[!SetVariable TriggerSlide 1][!ShowMeter MeterBinSize][Play "#@#WaterDrip.wav"][!UpdateMeasure MeasureAction]
MouseLeaveAction=[!SetVariable TriggerSlide 0][!HideMeter MeterBinSize][!Redraw]
LeftMouseUpAction=[Play "#@#WaterFlush.wav"][!CommandMeasure MeasureBinCount "OpenBin"]
RightMouseUpAction=[Play "#@#WaterFlush.wav"][!CommandMeasure MeasureBinCount "EmptyBin"][!UpdateMeasureGroup RecycleGroup][!UpdateMeasure MeasureAction]
DynamicVariables=1

[MeterRaindrops]
Meter=Image
ImageName=#@#Raindrop-#Frame#.png
UpdateDivider=-1
DynamicVariables=1

[MeterBinIconEmpty]
Meter=Image
X=10
Y=20
W=#BinIconSize#
ImageName=#BinIconEmpty#
AntiAlias=1
UpdateDivider=-1

[MeterBinIconFull]
Meter=Image
X=10
Y=20
W=#BinIconSize#
ImageName=#BinIconFull#
AntiAlias=1
UpdateDivider=-1

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

[MeterBinCount]
Meter=String
MeterStyle=Style
X=0r
Y=13r
MeasureName=MeasureBinCount
Text=%1 file

[MeterSphereGreen]
Group=SpheresGroup
Meter=Rotator
X=#SphereGreen_X#
Y=#SphereGreen_Y#
ImageName=#@#SphereGreen.png
StartAngle=(-PI/2)
RotationAngle=(PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1

[MeterSphereWhite]
Group=SpheresGroup
Meter=Rotator
X=#SphereWhite_X#
Y=#SphereWhite_Y#
ImageName=#@#SphereWhite.png
StartAngle=(-PI/2+PI/3)
RotationAngle=(-PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1

[MeterSphereBlue]
Group=SpheresGroup
Meter=Rotator
X=#SphereBlue_X#
Y=#SphereBlue_Y#
ImageName=#@#SphereBlue.png
StartAngle=(-PI/2-PI/3)
RotationAngle=(PI*2)
OffsetX=(-(#SphereRotationRadius#-#SphereSize#/2))
OffsetY=(#SphereSize#/2)
MeasureName=MeasureSpheresAngle
UpdateDivider=-1
The changes made were minor - that's the advantage of having a good base to build on: an OrbIndex, more OrbTints, removing updating the orb from #U# as it served no purpose since it wasn't about raindrops anymore, setting the #OrbIndex# and updating [MeterStartButton] in the update action of [MeasureBinSize] and using the said index in the ImageTint option of [MeterStartButton] instead of the old #Cycle# variable.

I didn't follow exactly the sizes you mentioned: the biggest two are 2 GB and 4 GB instead of 1.5 GB and 2 GB, because it suited the formula as they're powers of 2. In the formula, considering that you can use "only" natural logarithm (i.e. base e) and base 10 logarithm in Rainmeter and I needed base 2 logarithm to find out to which power should 2 be raised to get [MeasureBinSize:], I used the logarithm property which says that the base-2 logarithm is equal to the natural logarithm divided by ln 2, the natural logarithm of 2 (basically getting base 2 logarithm from the other two logarithms, base e and base 10). It's not as complicated as it seems: 2^28 = 268 435 456 = 256 (MB), so I needed more or less to find the difference between the power that 2 needed to be raised to get to [MeasureBinSize:] (i.e. the measure value's base 2 logarithm) and 28, and that was, again more or less, going to be the needed index. More or less because due to the particularity of these values and the required result, I needed to aply some tweaks, e.g. 27 instead of 28, Ceil(), Clamp() and Sgn().

If you want those >MIN and <=MAX intervals to be adjustable, you'll have to use either IfConditions (like in your previous attempt regarding those colors), or conditionals inside the formula. That will be your job, if you really want to, as they're not complicated, just much longer. I like short ones, where possible, hence the chosen approach.
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 »

Well, I see you reverted to the messy look in your code. :lol: But it's ok, it's yours - just don't ask me again to sort it out... :o

1. The new sphere thing is extremely easy now, after the code I posted above (it would have been even easier if I knew you're going to add more):
- create a copy of one of your existing sphere PNGs and name it, say, SphereTinted.png (obviously, in the same folder as the rest)
- add the corresponding X and Y variables for it in the [Variables] section (you can adjust them to your preference; I just copy pasted the last 2 coordinates and added 10 to the Y)
- to ease things out, now and in the future (see what I said earlier about this), replace all your 3 spheres hide/show bangs in Action1 & Action2 from the [Variables] section with [!HideMeterGroup SpheresGroup] and [!ShowMeterGroup SpheresGroup], respectively
- copy paste one of your sphere meters - I chose the last one - in order to create the meter for the new sphere, correspondingly named [MeterSphereTinted]
- change the new meter's X, Y, ImageName options, to point out to the corresponding values created above (its start angle is adjustable)
- copy paste the Greyscale and ImageTint lines from your orb to the new sphere meter
- since the orb index is changing while the skin is active, using dynamic variables is required in the new meter, so add the needed option
Hopefully, you'll manage to do all the above just by following the instructions and without any actual code. I know you can. :thumbup:

2. See the code I just posted earlier. One thing though, just so you know: in your previous reply, [!SetVariable Button_Image (Greyscale=1 ImageTint 255,0,255,0] is completely wrong. If you want to set the Greyscale and/or ImageTint options (or any options, for that matter), you have to use the !SetOption bang, and not !SetVariable, like [!SetOption Button_Image Greyscale 1][!SetOption Button_Image ImageTint "255,0,255,0"]. There might be other mistakes in your post, but I'm not going to search for them all - just compare what you tried with what I did and you'll realize where you were right and where you were not. ;-)
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 18th, 2020, 8:34 pm Well, I see you reverted to the messy look in your code. :lol: But it's ok, it's yours - just don't ask me again to sort it out... :o
Just a quick reply. And I'll work on this later on when I get a chance. The only reason why I did it to the messy code because it was just there to experiment things (plus it's one of the many files in the animationbin folder that i created as a 'tester'.) Eventually, I'm going jump into your clean code and use that for the final version. But I do like to keep comments in there (for future references) in case I have to look at the code again in the future, future.

Basically trying to see how my 'beginner's logic' work vs what an expert coder's brain work and compare the two, and see what I need to do differently.





Yincognito wrote: October 18th, 2020, 8:34 pm
Well, I see you reverted to the messy look in your code. :lol: But it's ok, it's yours - just don't ask me again to sort it out... :o

1. The new sphere thing is extremely easy now, after the code I posted above (it would have been even easier if I knew you're going to add more):
- create a copy of one of your existing sphere PNGs and name it, say, SphereTinted.png (obviously, in the same folder as the rest)
- add the corresponding X and Y variables for it in the [Variables] section (you can adjust them to your preference; I just copy pasted the last 2 coordinates and added 10 to the Y)
- to ease things out, now and in the future (see what I said earlier about this), replace all your 3 spheres hide/show bangs in Action1 & Action2 from the [Variables] section with [!HideMeterGroup SpheresGroup] and [!ShowMeterGroup SpheresGroup], respectively
- copy paste one of your sphere meters - I chose the last one - in order to create the meter for the new sphere, correspondingly named [MeterSphereTinted]
- change the new meter's X, Y, ImageName options, to point out to the corresponding values created above (its start angle is adjustable)
- copy paste the Greyscale and ImageTint lines from your orb to the new sphere meter
- since the orb index is changing while the skin is active, using dynamic variables is required in the new meter, so add the needed option
Hopefully, you'll manage to do all the above just by following the instructions and without any actual code. I know you can. :thumbup:
2. See the code I just posted earlier. One thing though, just so you know: in your previous reply, [!SetVariable Button_Image (Greyscale=1 ImageTint 255,0,255,0] is completely wrong. If you want to set the Greyscale and/or ImageTint options (or any options, for that matter), you have to use the !SetOption bang, and not !SetVariable, like [!SetOption Button_Image Greyscale 1][!SetOption Button_Image ImageTint "255,0,255,0"]. There might be other mistakes in your post, but I'm not going to search for them all - just compare what you tried with what I did and you'll realize where you were right and where you were not. ;-)

EDIT: -----------------------------------------------------------------------------------

Done. I photoshop/gimped some aesthetics so the inner liquid changes color (via the greyscale=1, tint code) while keeping the metal raindrop exterior the same color. Photoshopped/gimped color changed one of the green default sphere image so it doesn't color clash too much when the liquid turns green.

Using the clean code this time around. :thumbup:
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 18th, 2020, 9:51 pm Just a quick reply. And I'll work on this later on when I get a chance. The only reason why I did it to the messy code because it was just there to experiment things (plus it's one of the many files in the animationbin folder that i created as a 'tester'.) Eventually, I'm going jump into your clean code and use that for the final version. But I do like to keep comments in there (for future references) in case I have to look at the code again in the future, future.

Basically trying to see how my 'beginner's logic' work vs what an expert coder's brain work and compare the two, and see what I need to do differently.
Yeah, but you see, in the future when you'll know all these things (and this could happen really fast), you'll most likely wonder why you had to keep them there, as they would seem outrageously obvious. My point is, in the future you won't need them. It's only now that you do.

In any case, that's just my OCD speaking, LOL. And you don't need to put a note on every code that you post warning that it's messy - it may be perfectly ok for other people (obviously, I'm talking about the formatting or comments, not the potential syntax mistakes), not to mention that all kinds of codes are posted on a forum, it's not like it's the worst there is. Just relax, I'm probably putting too much emphasis on this anyway. :confused:
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 18th, 2020, 9:51 pmDone. I photoshop/gimped some aesthetics so the inner liquid changes color (via the greyscale=1, tint code) while keeping the metal raindrop exterior the same color. Photoshopped/gimped color changed one of the green default sphere image so it doesn't color clash too much when the liquid turns green.
Excellent! :thumbup: I imagined you wanted the orb exterior to stay the same - glad to see you managed to tweak it accordingly. ;-)