It is currently April 18th, 2024, 10:49 pm

Buienradar Skin, last updated not updating

Get help with creating, editing & fixing problems with skins
habell
Posts: 2
Joined: August 20th, 2019, 11:49 am

Buienradar Skin, last updated not updating

Post by habell »

I'm trying to show text when the weather image is last updated. But is seems I can't make it work.
It either updates realtime, or is updates once.

My code

Code: Select all

Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name=Buienradar
Author=Hans Bellwinkel
Information=Dynamische buienradar van Buienradar.nl
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=0.1

[MeterBackground]
Meter=Image
ImageName=#@#\backdrop.png
X=0
Y=0 

[MeasureAnimLoop]
Measure=Calc
Formula=(MeasureAnimLoop % 6) + 1
Disabled=1

[MeasureImage]
Measure=Plugin
Plugin=Plugins\WebParser
URL=http://gadget.buienradar.nl/m.aspx/RadarMapRainNL.gif
StringIndex=1
Download=1
DownloadFile=current.gif
ForceReload=1
FinishAction=[!CommandMeasure "MeasureExtract" "Run"]
UpdateRate=1000

[MeasureExtract]
Measure=Plugin
DynamicVariables=1
Plugin=RunCommand
Parameter=gif2frames.exe current.gif
StartInFolder=f:\Documents\Rainmeter\Skins\Buienradar\DownloadFile
FinishAction=[!SetOption MeterAnimLoop ImageName current0000[*MeasureAnimLoop*].png][!EnableMeasure MeasureAnimLoop][!UpdateMeasure MeasureFolder][!UpdateMeasure MeasureDate]

[MeterAnimLoop]
Meter=Image
ImagePath=#CURRENTPATH#DownloadFile
DynamicVariables=1
W=140
X=5
Y=5

[MeterSite]
Meter=BUTTON
X=125
Y=120
ButtonImage=#@#\buienradar.png
ButtonCommand=["https://www.buienradar.nl/weer/Veenendaal/NL/2745774"]

[MeasureFolder]
Measure=Plugin
Plugin=FileView
Path="#CURRENTPATH#DownloadFile"
ShowDotDot=0
ShowFolder=0
Count=3
UpdateRate=30

[MeasureDate]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FileDate
Format=%#d-%m-%Y %H:%M
Index=1
UpdateRate=30
FinishAction= [!UpdateMeter MeterText][!Redraw]

[MeterText]
Meter=String
MeasureName=MeasureDate
X=4
Y=146
W=140
H=25
FontColor=255,246,42
FontSize=7
FontWeight=700
Color=0,0,0,0
Text="Bijgewerkt:%1"
I want "MeterText" to be update when de "current.gif" is succesfully updated. That's why i've tried to get the filedate of the last update file.

Any help is welcome.
Last edited by habell on August 20th, 2019, 2:23 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Buienradar Skin, last updated not updating

Post by eclectic-tech »

In order to update the FileView plugin, you need to use !CommandMeasure (reference); it will not update using !UpdateMeasure.

You need to change the "FinishAction" in [MeasureExtract] to:

Code: Select all

FinishAction=[!SetOption MeterAnimLoop ImageName current0000[*MeasureAnimLoop*].png][!EnableMeasure MeasureAnimLoop][!CommandMeasure MeasureFolder "Update"]
The [MeasureDate] section is a FileView child measure and will update only when the parent measure [MeasureFolder] is updated, so you do not need to update that in a separate bang.

This will update the date text when the images are updated.

EDIT: You might want to change the [MeasureExtract] "StartInFolder" value to StartInFolder=#CurrentPath#DownloadFile rather than the absolute path you have for drive F:
habell
Posts: 2
Joined: August 20th, 2019, 11:49 am

Re: Buienradar Skin, last updated not updating

Post by habell »

Thanks very much for the input.

I've made the changes. In about 15 minutes I see if it works (the updaterate is about 15 minutes).
But the initial results are promissing.

Since "StartInFolder" did not work with the variable #CurrentPath# I've enter the absolute path.
I don't know why it won't work otherwise.
I've tried it now again, and is still doesn't work, so I've re-enter the absolute path.

Edit:The text is updated now! Thanks very much! :thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Buienradar Skin, last updated not updating

Post by eclectic-tech »

habell wrote: August 20th, 2019, 2:08 pm Thanks very much for the input.

I've made the changes. In about 15 minutes I see if it works (the updaterate is about 15 minutes).
But the initial results are promising.

Since "StartInFolder" did not work with the variable #CurrentPath# I've enter the absolute path.
I don't know why it won't work otherwise.
I've tried it now again, and is still doesn't work, so I've re-enter the absolute path.

Edit:The text is updated now! Thanks very much! :thumbup:
Glad to help! :thumbup:

#CurrentPath#DownloadFile is working for me... One thing you could try would be to surround the value in quotation marks (or double quotes), this may get it to work, if you have "spaces" in your skin path;
StartInFolder="#CurrentPath#DownloadFile"
StartInFolder=""#CurrentPath#DownloadFile""
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Buienradar Skin, last updated not updating

Post by jsmorley »

You absolutely should not need "quotes" or ""quotes"" around a StartInFolder parameter, spaces in the path or not.


1.jpg

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureFolder "Run"]

[MeasureFolder]
Measure=Plugin
Plugin=RunCommand
Parameter=dir /b
StartInFolder=#CURRENTPATH#Folder with s p a c e s

[MeterDummy]
Meter=String


2.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Buienradar Skin, last updated not updating

Post by eclectic-tech »

I was waiting for someone to critique that quotation suggestion. ;-)
Since Rainmeter throws away quotes it doesn't need, I figured it was worth suggesting. :Whistle

Thanks again for clarifying; at any rate, the OP should find a way to avoid using an absolute path in the run command (since it will only work on his computer)... O.O