It is currently June 20th, 2024, 11:27 am

Animation Question

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16317
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animation Question

Post by balala »

thesurfinsuricate wrote: April 15th, 2023, 8:37 am added [!UpdateMeasure "MeasureAnimation"] here MouseLeaveAction=[!DisableMeasure "MeasureAnimation"][!UpdateMeasure "MeasureAnimation"] that seems to do the trick!
No, not the [!UpdateMeasure "MeasureAnimation"] bang did the trick, but the fact that in the posted code, which doesn't have the above !UpdateMeasure bang, the bang was incorrectly written as [!DiableMeasure MeasureAnimation], but it should have been [!DisableMeasure MeasureAnimation] (see the missing s, in your bang). When you added the !UpdateMeasure, you fixed the wrongly written !DisableMeasure bang, and this did the trick. Try removing the !UpdateMeasure bang, and see the operation still works, even without it. If you leave the bang without the missing s, even having the !UpdateMeasure bang, the disabling operation still doesn't work.
thesurfinsuricate
Posts: 42
Joined: March 20th, 2020, 4:47 pm

Re: Animation Question

Post by thesurfinsuricate »

balala wrote: April 15th, 2023, 6:43 pm No, not the [!UpdateMeasure "MeasureAnimation"] bang did the trick, but the fact that in the posted code, which doesn't have the above !UpdateMeasure bang, the bang was incorrectly written as [!DiableMeasure MeasureAnimation], but it should have been [!DisableMeasure MeasureAnimation] (see the missing s, in your bang). When you added the !UpdateMeasure, you fixed the wrongly written !DisableMeasure bang, and this did the trick. Try removing the !UpdateMeasure bang, and see the operation still works, even without it. If you leave the bang without the missing s, even having the !UpdateMeasure bang, the disabling operation still doesn't work.
Yes you're correct! Works without the !UpdateMeasure. Cant understand how that s got lost...
User avatar
balala
Rainmeter Sage
Posts: 16317
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Animation Question

Post by balala »

thesurfinsuricate wrote: April 15th, 2023, 8:48 pm Cant understand how that s got lost...
Don't worry, it happens many time to all of us. Right now I just posted a reply (into another topic), which I had to fix three times, until I got it in a proper form. So this is not a problem. Problem is that in many cases you don't even realize what is wrong, even if you look many times to the code. Happened to me too, many times...
User avatar
PsxDoomForever
Posts: 13
Joined: November 5th, 2023, 2:40 pm

Re: Animation Question

Post by PsxDoomForever »

:HamseterDancer PLEASE HELP :sos: :HamseterDancer

Hello!

I am hope for your help. I feel like a teapot. :-(

How to write a script code so that when you hover the cursor over a shortcut, an animation consisting of 4 consecutive or 8 (more) frames is played.
Let's say I have 4 frames of animation of an image measuring 256X256. How should I name them so that the program will use them to animate the shortcut?
Is it possible to change the shortcut animation speed? :TrainRight
I'm also wondering if it's possible to change the text color for each desktop shortcut? :party:
Is it also possible to assign a script command so that when you hover over a certain icon, a sound file is played? :17drums
ZXCVBOT

Re: Animation Question

Post by ZXCVBOT »

Hello! Before I should explain, refer to this manual/tip here: https://docs.rainmeter.net/tips/animated-gif-files/

I have a code that makes it look too easy:

Code: Select all

[Rainmeter]
Update=75

[Variables]
Image=

[NumberOfImages]
Measure=Calc
Formula=Counter % 4

[ImageMeter]
Meter=Image
W=256
H=256
AntiAlias=1
DynamicVariables=1
ImageName=#Image#
MouseOverAction=Play "SomeFile.wav"
MouseLeaveAction=PlayStop

This was written by me quite some time ago and stands true to the stated manual. It requires ImageMagick though, but if you have the frames as jpg/png it will work too. If you have a gif file, use this: convert -coalesce "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png" in Command Prompt (cmd).

I set the Counter % 4, where 4 is the number of frames and the W and H of the image ie. 256x256px. You only have to do 2 things: Define Update (It will set the speed for this short code - It otherwise has some complex uses) as per your convenience and set Image=Blah/blah.png in Variables.
PsxDoomForever wrote: November 5th, 2023, 2:58 pm I'm also wondering if it's possible to change the text color for each desktop shortcut?
Is it also possible to assign a script command so that when you hover over a certain icon, a sound file is played?
The desktop shortcuts - as in default ones that come in package with operating system or shortcuts from some skin in Rainmeter?
PsxDoomForever wrote: November 5th, 2023, 2:58 pm Is it also possible to assign a script command so that when you hover over a certain icon, a sound file is played?
Edit:
It is possible and easily too, but since I am not an expert in that field, I'll pass this one, maybe someone else can do this.
Got it: Source: https://docs.rainmeter.net/manual/bangs/#Play

I've made a little change in the image-meter and now, it will play a file as soon as you hover over it, but will stop when the pointer is away. So, also change "SomeFile.wav" to whatever you want to play.
Last edited by ZXCVBOT on November 5th, 2023, 3:54 pm, edited 1 time in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7458
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animation Question

Post by Yincognito »

PsxDoomForever wrote: November 5th, 2023, 2:58 pm :HamseterDancer PLEASE HELP :sos: :HamseterDancer

Hello!

I am hope for your help. I feel like a teapot. :-(

How to write a script code so that when you hover the cursor over a shortcut, an animation consisting of 4 consecutive or 8 (more) frames is played.
Let's say I have 4 frames of animation of an image measuring 256X256. How should I name them so that the program will use them to animate the shortcut?
Is it possible to change the shortcut animation speed? :TrainRight
I'm also wondering if it's possible to change the text color for each desktop shortcut? :party:
Is it also possible to assign a script command so that when you hover over a certain icon, a sound file is played? :17drums
Probably yes to all your questions, if by shortcut you mean a meter (i.e. a visual element) in a Rainmeter skin. If you meant Windows' desktop shortcuts, this is not possible from Rainmeter.

On hover: here and probably here to see how to use bangs in those action options
On animation: here (you're probably thinking of Method One there, skip the bits about GIFs since your images are already individual files)
On speed: here for the simple method, here for the complex one involving ActionTimer measures
On text color: here, as part of a String meter
On playing sound: here, added as a bang in a mouse action option from the desired meter

You don't have to read everything, just the highlighted parts or parts that interest you. I know it may seem like a lot to process right away, but take your time and see if you can replicate the animation referred to in the link above for your case. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
PsxDoomForever
Posts: 13
Joined: November 5th, 2023, 2:40 pm

Re: Animation Question

Post by PsxDoomForever »

ZXCVBOT wrote: November 5th, 2023, 3:45 pm Hello! Before I should explain, refer to this manual/tip here: https://docs.rainmeter.net/tips/animated-gif-files/

I have a code that makes it look too easy:

Code: Select all

[Rainmeter]
Update=75

[Variables]
Image=

[NumberOfImages]
Measure=Calc
Formula=Counter % 4

[ImageMeter]
Meter=Image
W=256
H=256
AntiAlias=1
DynamicVariables=1
ImageName=#Image#
This was written by me quite some time ago and stands true to the stated manual. It requires ImageMagick though, but if you have the frames as jpg/png it will work too. If you have a gif file, use this: convert -coalesce "C:\PathToInput\InputName.gif" "C:\PathToOutput\OutputName.png" in Command Prompt (cmd).

I set the Counter % 4, where 4 is the number of frames and the W and H of the image ie. 256x256px. You only have to do 2 things: Define Update (It will set the speed for this short code - It otherwise has some complex uses) as per your convenience and set Image=Blah/blah.png in Variables.


The desktop shortcuts - as in default ones that come in package with operating system or shortcuts from some skin in Rainmeter?


It is possible and easily too, but since I am not an expert in that field, I'll pass this one, maybe someone else can do this.
Thank you, I'll try it now. :17good I didn't expect such a quick response, which definitely makes me very happy. Yes I have 4 frames in png format for the label. I want to make sure that when you hover the mouse cursor they change one by one - this is how I get the animation I dream about.
User avatar
Yincognito
Rainmeter Sage
Posts: 7458
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Animation Question

Post by Yincognito »

ZXCVBOT wrote: November 5th, 2023, 3:45 pmI have a code that makes it look too easy:

Code: Select all

[Rainmeter]
Update=75

[Variables]
Image=

[NumberOfImages]
Measure=Calc
Formula=Counter % 4

[ImageMeter]
Meter=Image
W=256
H=256
AntiAlias=1
DynamicVariables=1
ImageName=#Image#
For this case, I think the Image variable is not needed, and directly using the [NumberOfImages] measure in the ImageName option from the meter should suffice. Other than that, "number of images" is kind of a misnomer, as "frame number" is a more descriptive term there.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
ZXCVBOT

Re: Animation Question

Post by ZXCVBOT »

Hello Yincognito. I already stated - This code was written by me a long time ago - maybe a year too. Mistakes can easily be found just not misnomers, but others too.

Edit: This one's for PsxDoomForever:
Is that Samuel Hayden of Ultimate DOOM?
Last edited by ZXCVBOT on November 5th, 2023, 3:59 pm, edited 1 time in total.
User avatar
PsxDoomForever
Posts: 13
Joined: November 5th, 2023, 2:40 pm

Re: Animation Question

Post by PsxDoomForever »

Yincognito wrote: November 5th, 2023, 3:49 pm Probably yes to all your questions, if by shortcut you mean a meter (i.e. a visual element) in a Rainmeter skin. If you meant Windows' desktop shortcuts, this is not possible from Rainmeter.

On hover: here and probably here to see how to use bangs in those action options
On animation: here (you're probably thinking of Method One there, skip the bits about GIFs since your images are already individual files)
On speed: here for the simple method, here for the complex one involving ActionTimer measures
On text color: here, as part of a String meter
On playing sound: here, added as a bang in a mouse action option from the desired meter

You don't have to read everything, just the highlighted parts or parts that interest you. I know it may seem like a lot to process right away, but take your time and see if you can replicate the animation referred to in the link above for your case. ;-)
Thank you for your quick response and information on my questions. Own shortcuts on the Windows desktop that will be responsible for this or that folder or program on my desktop - can’t they be animated? :jawdrop I saw on YouTube how a person made a simple animation script for a browser shortcut with one frame.