As promised, here is the updated code:
- is more compact, for the sake of clarity avoiding redundancy
- corrects the many duplicate UpdateDividers for the same measures/meters that existed in the previous code, as well as obsolete bangs
- adds playing the sound (had to find one online, as it wasn't included in the 2 packages I had at my disposal) on every raindrop, based on the moment when the raindrop falls, so now, as long as one raindrop means 12 frames, you can either decrease or increase the frame count (assuming the images exist) to have less or more raindrops and the sound will play for as many raindrops as there are in total (this is true for the endless animation as well: every raindrop will generate a sound; this can of course be adjusted, to limit on how many raindrops the sound is desired, let me know if you want to)
- adds the sphere animation to the general one, in the same ActionTimer measure; this means that the skin can safely have a larger update rate (I left it as 1000 ms, i.e. 1 second) without interfering with the animations; this also means that the stutter in the sphere animation is gone, as it isn't based on the seconds time anymore, but on incrementing a variable in the ActionTimer measure; also, the sphere animation "speed" is easily adjustable on an independent basis, by changing the value of the SpheresAngleIncrement variable; the spheres rotation radiuses are adjustable as well, by changing the value of the SphereRotationRadius (so far all 3 spheres have the same rotational radius, but this can be adjusted if you create and use 3 radius variables instead of just 1)
I removed all the unneeded or unused files, comments, measures, meters, etc. (they just created more confusion than being actually useful), so make sure you add what you really need back.
Some info on the variables (the [Variables]
section is the main place where things can be adjusted):
- TriggerSlide: initially 0, used to trigger the animations on mouse over
- Frame: initially 0, it's the current frame number in the raindrop animation
- FrameCount: the total number of frames in the raindrop animation; its change will affect the number of played raindrop sounds accordingly
- SpheresAngle: initially 0, the angle in degrees of the spheres rotation; this is added to the adjustable value of StartAngle
in the sphere meters
- SpheresAngleIncrement: by how many degrees the angle of the spheres rotation is incremented in the ActionTimer measure
- Speed: the wait time in milliseconds between the animation sequence "steps" in the ActionTimer measure
- BinIconSize: size of the recycle bin icon in pixels; I left the icon there, although it doesn't look that well, probably needs to be moved or removed
- BinIconEmpty: the path and file name of the empty recycle bin icon
- BinIconFull: the path and file name of the full recycle bin icon
- SphereSize: the size in pixels of a sphere image; due to how Rotator meters are designed, resizing the image itself externally is needed to adjust the size of the image
- SphereRotationRadius: the length in pixels of the radius of the circles on which the spheres are rotated
- SphereWhite_X: the center of rotation's X for the white sphere
- SphereWhite_Y: the center of rotation's Y for the white sphere
- SphereBlue_X: the center of rotation's X for the blue sphere
- SphereBlue_Y: the center of rotation's Y for the blue sphere
- SphereGreen_X: the center of rotation's X for the green sphere
- SphereGreen_Y: the center of rotation's Y for the green sphere
- U: the bangs executed after an animation sequence "step" in the ActionTimer measure
- Action1: the bangs executed when the one time animation (i.e. Action1 in the ActionTimer measure) is triggered
- Action2: the bangs executed when the endless animation (i.e. Action2 in the ActionTimer measure) is triggered
Other useful info:
- since the value of the Sgn() function is 0 for 0 and 1 for positive numbers (and adding 1 to it yields precisely the number of the animation that should be used for MeasureBinCount values), I used the (Sgn(MeasureBinCount)+1) formula in [MeasureAction] to get the animation "index" needed to be triggered
- since MeasureAction already holds the number / index of the needed animation, it can be easily used to execute the appropriate bang sequence stored in the corresponding variables (i.e. Action1 and Action2) from the [Variables] section. Thus, with a little help from the nested variable syntax (which allows to have the name and value of a variable in another variable name), the conditional actions in [MeasureAction] can be written as [#Action[&MeasureAction]], meaning Rainmeter will choose the correct Action1 or Action2 variable ([# part means variable) based on the value of the MeasureAction measure ([& part means measure).
In other words, if MeasureBinCount is, say, 20, then:
- the [MeasureAction] formula yields (Sgn(MeasureBinCount)+1) = (Sgn(20)+1) = (1+1) = 2
- the [MeasureAction] will, in the conditionals handling the bin count and the triggering by mouse over, execute [#Action[&MeasureAction]] = [#Action2] = #Action2# variable, which is already appropriately declared in the [Variables] section as the desired sequence of bangs
That's pretty much it, hopefully it will be of some use - if you have any other questions, don't hesitate to ask, wihout being concerned about reading between the lines of an internet post (which can often be misleading). I'm a direct and honest guy, I say things as they are without hiding around the bush - but again, as I said, I was referring to paying attention to what has been written already (for example, "[MeasureBinCount] simulates a recycle bin count (in your code, it would be the actual recycle bin count measure)"
, that kind of things) and NOT to anyone's intelligence.
As always, feel free to adjust and adapt things to your preference in the above code.
You do not have the required permissions to view the files attached to this post.