It is currently March 28th, 2024, 9:11 pm

animated weather image

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

animated weather image

Post by xenium »

Hi,
I would like to know if the following situation is possible:
for example: for overcast, the icon d400.png is displayed.
I want the icon to be replaced by a gif consisting of 25 images.
The problem is that all images should have the name d400

Thanks
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: animated weather image

Post by balala »

xenium wrote:I want the icon to be replaced by a gif consisting of 25 images.
The problem is that all images should have the name d400
Why?
Although I don't understand why all images should have to have the same name, Rainmeter can't play the animated gifs, as they are. However, there are two different possibilities to display such animations. Here are the descriptions how this can be achieved: https://docs.rainmeter.net/tips/animated-gif-files/
For more specific help, you should have to post an image and the code you have so far.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

balala wrote:Why?
Although I don't understand why all images should have to have the same name, Rainmeter can't play the animated gifs, as they are. However, there are two different possibilities to display such animations. Here are the descriptions how this can be achieved: https://docs.rainmeter.net/tips/animated-gif-files/
For more specific help, you should have to post an image and the code you have so far.
Initially, the skin displays the d400.png icon.

The gif I want to replace the icon is composed of 16 images.
This is the code but does not display the gif image:

Code: Select all

[Rainmeter]
Author=xxenium
AppVersion=1.0


[Variables]
UpdateRateSeconds=100
FontFace=Subpear
URL=https://www.foreca.com/Spain/Madrid?tenday
URL1=https://www.foreca.com/Spain/Madrid

=============Measure=============


[MeasureName]
Measure=WebParser
Url=#URL#
RegExp="(?siU)<h1>(.*)</h1>.*"
UpdateRate=#UpdateRateSeconds#
Substitute="&deg;":""
StringIndex=1

[MeasureSymbol]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="symbol_70x70.* symbol_(.*)_70x70 cc_symb".*"
StringIndex=1
UpdateRate=#UpdateRateSeconds#

[MeasureConditions]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""

[measureCalc_d400]
measure=Calc
formula=counter % 16
dynamicVariables=1


==============Meter===================

[MeterSymbol]
Meter=Image
MeasureName=MeasureSymbol
ImageName="d400.\Frame[measureCalc_d400].png"
X=0
Y=0
DynamicVariables=1


[MeterName]
Meter=String
MeasureName=MeasureName
X=285
Y=25
W=290
H=50
FontColor=250,250,250,250
StringStyle=bold
StringEffect=SHADOW
FontFace=Subpear
StringAlign=Left
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=20


[MeterConditions]
Meter=String
MeasureName=MeasureConditions
X=30
Y=80
W=355
H=150
FontColor=250,250,250,250
FontSize=22
FontFace=Calibri
StringStyle=BOLD
StringAlign=Left
StringEffect=SHADOW
FontEffectColor=0,0,0,80
ClipString=1
AntiAlias=1
 
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

ImageName="d400.\Frame[measureCalc_d400].png"

So your images are in a folder inside the skin folder named d400. (with a dot) and the files are named Frame1.png ... Frame16.png.

Is that right? I'm suspicious that it isn't...
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

jsmorley wrote:ImageName="d400.\Frame[measureCalc_d400].png"

So your images are in a folder inside the skin folder named d400. (with a dot) and the files are named Frame1.png ... Frame16.png.

Is that right? I'm suspicious that it isn't...
yes it is right
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

Ok, I think you have a conflict here:

Code: Select all

[MeterSymbol]
Meter=Image
MeasureName=MeasureSymbol
ImageName="d400.\Frame[measureCalc_d400].png"
X=0
Y=0
DynamicVariables=1
That MeasureName option is in conflict with the ImageName option and the MeasureName option will win. Try it with just the ImageName option alone.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

jsmorley wrote:Ok, I think you have a conflict here:

Code: Select all

[MeterSymbol]
Meter=Image
MeasureName=MeasureSymbol
ImageName="d400.\Frame[measureCalc_d400].png"
X=0
Y=0
DynamicVariables=1
That MeasureName option is in conflict with the ImageName option and the MeasureName option will win. Try it with just the ImageName option alone.
I tried and did not work
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: animated weather image

Post by jsmorley »

You will need to .zip up your entire skin root config folder, so I can have all the code and images in the structure they actually live in, and post that somewhere I can get it (if it is bigger than 3MB or so) or attach it as a file here if it small enough.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: animated weather image

Post by xenium »

I changed the d400 to d100 because the current location conditions have changed
(d100-mostly clear, d400-overcast)
TestWeatherSkin.zip
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: animated weather image

Post by balala »

xenium wrote:I changed the d400 to d100 because the current location conditions have changed
(d100-mostly clear, d400-overcast)TestWeatherSkin.zip
This doesn't seem to be a good idea. You'll replace the path all the time when the weather condition is changing? Don't think so...
However the problem is indeed what jsmorley mentioned in one of his previous replies: there is a conflict between the ImageName and MeasureName options of the [MeterSymbol] meter. The MeasureName has priority in front of ImageName. If both options are present in an Image meter, the meter will try to load the image provided by the MeasureName option. But in your case, that image doesn't exist, so the meter fails and the image isn't loaded at all.
Simply remove the MeasureName option of the [MeterSymbol] meter. When the skin is refreshed, the images are loaded with no problem.
Just mention that also there is a problem with the path of the images: the name of the folder containing the images is d100 (without the dot), but in the ImageName option you've used the d100. name (with dot this time). Fix this, too.
And one more: the [measureCalc_d100] Calc measure doesn't need the DynamicVariables=1 option. Also can remove it.