It is currently May 4th, 2024, 8:14 am
Get help with creating, editing & fixing problems with skins
rbriddickk84
Rainmeter Sage
Posts: 276 Joined: February 17th, 2014, 12:39 pm
Location: Hungary
Post
by rbriddickk84 » July 31st, 2016, 4:38 pm
Greetings!
I was wondering if somehow i could change dynamically the StringIndex in a WebParser. my reason is below:
Website link, and the code in it:
http://www.idokep.hu/radar/radar.js?bb55f
Code: Select all
var radarfile = [
'/radar/2tr_18_20.png',
'/radar/2tr_18_10.png',
'/radar/2tr_18_00.png',
'/radar/2tr_17_50.png',
'/radar/2tr_17_40.png',
'/radar/2tr_17_30.png',
];
var radartime = [
'18:20',
'18:10',
'18:00',
'17:50',
'17:40',
'17:30',
];
And here is my code in Rainmeter, which needed to modify, to change the 6 png images in arrange from the site code:
Code: Select all
[Rainmeter]
Update=40
AccurateText=1
DynamicWindowSize=1
[RadarMeasureParser]
Measure=Plugin
Plugin=WebParser
URL=http://www.idokep.hu/radar/radar.js?bb55f
RegExp=(?siU)'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*
UpdateRate=3500
[RadarAnimator]
Measure=Loop
;Group=PC
StartValue=1
EndValue=6
Increment=1
LoopCount=0
UpdateDivider=11
Disabled=1
[ParseImages]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[RadarMeasureParser]
StringIndex=1
DynamicVariables=1
If somehow i could sync the RadarAnimator, and the ParseImages's StringIndex value, then it would be set, but i don't know if it's possible?
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » July 31st, 2016, 4:57 pm
Sorry, but I don't understand what you want.
Can you explain what do you want?
rbriddickk84
Rainmeter Sage
Posts: 276 Joined: February 17th, 2014, 12:39 pm
Location: Hungary
Post
by rbriddickk84 » July 31st, 2016, 5:08 pm
Sure!
In the first code, which i get with the first webparser from this link
http://www.idokep.hu/radar/radar.js?bb55f
is containing 6 png adresses
'/radar/2tr_18_50.png'
And i modify it with anothe WebParser to make downloadable the png image
'
http://www.idokep.hu/radar/2tr_18_50.png '
But as you see in the RegExp section i read out the 6 png locations, so if i could change the StringIndex in a loop from 1-6, like an animation, i could animate dynamically a radar wather image.
Like if the StringIndex would be a scrollbar, and i just move it from 1 to 6, and back to 1, and 2, 3, 4, 5, 6 again, you know, like an animation, just dynamic.
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » July 31st, 2016, 5:34 pm
Something like this one?
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
ImagePath=#CURRENTPATH#DownloadFile
SecondsBetween=2
[RadarMeasureParser]
Measure=Plugin
Plugin=WebParser
URL=http://www.idokep.hu/radar/radar.js?bb55f
RegExp=(?siU)'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*'(.*)'.*
UpdateRate=600
FinishAction=[!EnableMeasureGroup Radar][!UpdateMeasureGroup Radar]
[RadarImage1]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=6
Group=Radar
Disabled=1
[RadarImage2]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=5
Group=Radar
Disabled=1
[RadarImage3]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=4
Group=Radar
Disabled=1
[RadarImage4]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=3
Group=Radar
Disabled=1
[RadarImage5]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=2
Group=Radar
Disabled=1
[RadarImage6]
Measure=Plugin
Plugin=WebParser
URL=[RadarMeasureParser]
StringIndex=1
Group=Radar
Disabled=1
[ParseImages1]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage1]
Download=1
DownloadFile=1.png
DynamicVariables=1
Group=Radar
Disabled=1
[ParseImages2]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage2]
Download=1
DownloadFile=2.png
DynamicVariables=1
Group=Radar
Disabled=1
[ParseImages3]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage3]
Download=1
DownloadFile=3.png
DynamicVariables=1
Group=Radar
Disabled=1
[ParseImages4]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage4]
Download=1
DownloadFile=4.png
DynamicVariables=1
Group=Radar
Disabled=1
[ParseImages5]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage5]
Download=1
DownloadFile=5.png
DynamicVariables=1
Group=Radar
Disabled=1
[ParseImages6]
Measure=Plugin
Plugin=WebParser
URL=http://idokep.hu[&RadarImage6]
Download=1
DownloadFile=6.png
DynamicVariables=1
Group=Radar
Disabled=1
[MeasureFolder]
Measure=Plugin
Plugin=FileView
Recursive=2
Path=#ImagePath#
Extensions=jpg;png;bmp
[MeasureLoop]
Measure=Loop
StartValue=1
EndValue=6
Increment=1
LoopCount=0
UpdateDivider=#SecondsBetween#
[MeasureImagePath]
Measure=Plugin
Plugin=FileView
Path=[MeasureFolder]
Type=FilePath
IgnoreCount=1
Index=[MeasureLoop]
DynamicVariables=1
[MeterImage]
Meter=Image
X=0
Y=0
W=200
H=125
MeasureName=MeasureImagePath
PreserveAspectRatio=0
DynamicVariables=1
rbriddickk84
Rainmeter Sage
Posts: 276 Joined: February 17th, 2014, 12:39 pm
Location: Hungary
Post
by rbriddickk84 » July 31st, 2016, 6:06 pm
Wow, yes, i think exactly like that one. In the meantime i realised that there is no way to make a short version of it changind dynamically the stringindex, we must hardcode it.
Thank you very much for your help, much appretiate it!!!
FreeRaider
Posts: 826 Joined: November 20th, 2012, 11:58 pm
Post
by FreeRaider » July 31st, 2016, 6:14 pm
Glad to help!