It is currently April 19th, 2024, 7:09 pm

WEATHER RADAR

Get help with creating, editing & fixing problems with skins
Tracidas-2020
Posts: 12
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

WOW! it works! this is amazing! :o :thumbup: :thumbup: :thumbup: I love it! :thumbup:

Thank you!!!!

Still I have a few notes :)

Can you make it that the date and time of the last image is shown at the right bottom corner.

Something like this: 2020-05-21 09:15 val.

https://imgur.com/Zh7VAgv

That would be perfect!
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote: May 21st, 2020, 7:23 am Still I have a few notes :)

Can you make it that the date and time of the last image is shown at the right bottom corner.

Something like this: 2020-05-21 09:15 val.

https://imgur.com/Zh7VAgv

That would be perfect!
This can easily be done. Just add a Dist=15 variable (use whatever value do you want - will describe immediately what this is) to the [Variables] section and the following String meter to the end of the code:

Code: Select all

[MeterDateTime]
Meter=STRING
X=(#CURRENTCONFIGWIDTH#-#Dist#)
Y=(#CURRENTCONFIGHEIGHT#-#Dist#)
Padding=15,5,15,5
FontColor=0,0,220
FontEffectColor=220,220,220
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RightBottom
AntiAlias=1
Text=#Date# #Hour#:#Minute#
DynamicVariables=1
As you can see, the Dist variable is used into the X and Y options of this meter. It represents both distances (horizontally and vertically) from the bottom right corner of the meter, to the bottom right corner of the skin. You can edit the above options as you wish.
Tracidas-2020
Posts: 12
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

Easy for you :) i'm quite new here.
Not sure if i'm doing it right. :???: In my rainmeter skin folder. I created a folder for this skin, i put the ini file with the code you sent me earlier, and I should put that additional code for the date and time in the same ini file, right?
Well I dit put the additional code, but the date and time won't show.. :confused:
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote: May 21st, 2020, 9:16 am Easy for you :) i'm quite new here.
Don't worry, if you keep working, you gonna figure out how to do many things...
Tracidas-2020 wrote: May 21st, 2020, 9:16 am Not sure if i'm doing it right. :???: In my rainmeter skin folder. I created a folder for this skin, i put the ini file with the code you sent me earlier, and I should put that additional code for the date and time in the same ini file, right?
Exactly. Copy and paste the code of the [MeterDateTime] meter to the end of the same .ini file.
Tracidas-2020 wrote: May 21st, 2020, 9:16 am Well I dit put the additional code, but the date and time won't show.. :confused:
Did you refresh the skin? I suppose you didn't, so refresh it.
The refresh is required whenever are you changing the code, in order to apply the changes.
Tracidas-2020
Posts: 12
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

Saved it. Refreshed it. No luck... :confused:
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote: May 21st, 2020, 10:22 am Saved it. Refreshed it. No luck... :confused:
Post the whole code, please.
Tracidas-2020
Posts: 12
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
ImageSize=300

[MeasureMap]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=main
Download=1
DownloadFile=Map.png

[MeasureSite]
Measure=WebParser
UpdateRate=900
Url=https://m.meteo.lt/faktine-informacija/radaras/14
RegExp=(?si)<div class="hour" data-time=".*" data-full-date="Gegužės .* d.">(.*)</div>
DecodeCharacterReference=3
FinishAction=[!SetVariable Hour "[MeasureHour]"][!SetVariable Minute "[MeasureMinute]"][!SetVariable Date "[MeasureDate]"][!UpdateMeasure "MeasureImage"][!EnableMeasure "MeasureImage"][!CommandMeasure "MeasureImage" "Update"]

[MeasureHour]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\1"

[MeasureMinute]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\2"

[MeasureDate]
Measure=Time
Format=%Y-%m-%d

[MeasureImage]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=radar&d=#Date#+#Hour#%3A#Minute#%3A00
DynamicVariables=1
Download=1
Disabled=1
DownloadFile=Static.png
FinishAction=[!ShowMeter "MeterStatic"][!Redraw]
UpdateRate=30

[MeterMap]
Meter=Image
MeasureName=MeasureMap
X=0
Y=0
W=#ImageSize#
DynamicVariables=1
SolidColor=255,255,255

[MeterStatic]
Meter=Image
MeasureName=MeasureImage
X=0r
Y=0r
W=#ImageSize#
DynamicVariables=1
Hidden=1

[MeterDateTime]
Meter=STRING
X=(#CURRENTCONFIGWIDTH#-#Dist#)
Y=(#CURRENTCONFIGHEIGHT#-#Dist#)
Padding=15,5,15,5
FontColor=0,0,220
FontEffectColor=220,220,220
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RightBottom
AntiAlias=1
Text=#Date# #Hour#:#Minute#
DynamicVariables=1
Last edited by balala on May 21st, 2020, 10:58 am, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote: May 21st, 2020, 10:42 am

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
ImageSize=300

[MeasureMap]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=main
Download=1
DownloadFile=Map.png

[MeasureSite]
Measure=WebParser
UpdateRate=900
Url=https://m.meteo.lt/faktine-informacija/radaras/14
RegExp=(?si)<div class="hour" data-time=".*" data-full-date="Gegužės .* d.">(.*)</div>
DecodeCharacterReference=3
FinishAction=[!SetVariable Hour "[MeasureHour]"][!SetVariable Minute "[MeasureMinute]"][!SetVariable Date "[MeasureDate]"][!UpdateMeasure "MeasureImage"][!EnableMeasure "MeasureImage"][!CommandMeasure "MeasureImage" "Update"]

[MeasureHour]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\1"

[MeasureMinute]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\2"

[MeasureDate]
Measure=Time
Format=%Y-%m-%d

[MeasureImage]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=radar&d=#Date#+#Hour#%3A#Minute#%3A00
DynamicVariables=1
Download=1
Disabled=1
DownloadFile=Static.png
FinishAction=[!ShowMeter "MeterStatic"][!Redraw]
UpdateRate=30

[MeterMap]
Meter=Image
MeasureName=MeasureMap
X=0
Y=0
W=#ImageSize#
DynamicVariables=1
SolidColor=255,255,255

[MeterStatic]
Meter=Image
MeasureName=MeasureImage
X=0r
Y=0r
W=#ImageSize#
DynamicVariables=1
Hidden=1

[MeterDateTime]
Meter=STRING
X=(#CURRENTCONFIGWIDTH#-#Dist#)
Y=(#CURRENTCONFIGHEIGHT#-#Dist#)
Padding=15,5,15,5
FontColor=0,0,220
FontEffectColor=220,220,220
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RightBottom
AntiAlias=1
Text=#Date# #Hour#:#Minute#
DynamicVariables=1
The Dist variable is missing from the [Variables] section. Add it as described here.
Tracidas-2020
Posts: 12
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

You mean like this? I added, refreshed, nothing has changed :(

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
ImageSize=300

[MeasureMap]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=main
Download=1
DownloadFile=Map.png

[MeasureSite]
Measure=WebParser
UpdateRate=900
Url=https://m.meteo.lt/faktine-informacija/radaras/14
RegExp=(?si)<div class="hour" data-time=".*" data-full-date="Gegužės .* d.">(.*)</div>
DecodeCharacterReference=3
FinishAction=[!SetVariable Hour "[MeasureHour]"][!SetVariable Minute "[MeasureMinute]"][!SetVariable Date "[MeasureDate]"][!UpdateMeasure "MeasureImage"][!EnableMeasure "MeasureImage"][!CommandMeasure "MeasureImage" "Update"]

[MeasureHour]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\1"

[MeasureMinute]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\2"

[MeasureDate]
Measure=Time
Format=%Y-%m-%d

[MeasureImage]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=radar&d=#Date#+#Hour#%3A#Minute#%3A00
DynamicVariables=1
Download=1
Disabled=1
DownloadFile=Static.png
FinishAction=[!ShowMeter "MeterStatic"][!Redraw]
UpdateRate=30

[MeterMap]
Meter=Image
MeasureName=MeasureMap
X=0
Y=0
W=#ImageSize#
DynamicVariables=1
SolidColor=255,255,255

[MeterStatic]
Meter=Image
MeasureName=MeasureImage
X=0r
Y=0r
W=#ImageSize#
DynamicVariables=1
Hidden=1

[MeterDateTime]
Meter=STRING
X=(#CURRENTCONFIGWIDTH#-#Dist#)
Y=(#CURRENTCONFIGHEIGHT#-#Dist#)
Padding=15,5,15,5
FontColor=0,0,220
FontEffectColor=220,220,220
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RightBottom
AntiAlias=1
Text=#Date# #Hour#:#Minute#
DynamicVariables=1
Dist=15
Last edited by balala on May 21st, 2020, 11:27 am, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote: May 21st, 2020, 11:20 am You mean like this? I added, refreshed, nothing has changed :(
Dist is a variable and as such it has to be added to the [Variables] section, not to the [MeterDateTime] meter, where you have added it. Move it to [Variables] and refresh the skin.
And whenever are you posting codes, please use the </> button, to delimitate the code. It's on the forum menu, when you're editing / writing your post.