Yeah, WebParser doesn't yet support DynamicVariables=1.kanine wrote:Well at least I wasn't going mad last night, just bleary eyed.
I'm pretty sure I should be able to work around it, I'll keep an eye on release notes for any relevant changes in the future. I guess it's like the Dynamic=1 scenario?
It is currently April 27th, 2024, 1:31 pm
Fast changing PNG's with transparencies
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Fast changing PNG's with transparencies
-
- Posts: 62
- Joined: June 29th, 2012, 9:09 am
Re: Fast changing PNG's with transparencies
No worries, it's an incredible piece of software engineering.jsmorley wrote: Yeah, WebParser doesn't yet support DynamicVariables=1.
I've used the same collector / measure approach again so the top of the skin looks like this now:
Code: Select all
[Measure10Minutes]
Measure=Calc
Formula=(Measure10Minutes %900) + 1
IfEqualValue=1
IfEqualAction=["#@#Scripts\bomRadar.vbs"]
[MeasureRadarConfig]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=60
Url=file://#@#Scripts\bomRadar-calculations.txt
RegExp="(?siU)<RadarLocation>(.*)</RadarLocation>.*<RadarImage0>(.*)</RadarImage0>.*<RadarImage1>(.*)</RadarImage1>.*<RadarImage2>(.*)</RadarImage2>.*<RadarImage3>(.*)</RadarImage3>.*<RadarImage4>(.*)</RadarImage4>.*<RadarImage5>(.*)/RadarImage5>"
StringIndex=1
Code: Select all
[MeasureAniImage1]
Measure=Plugin
Plugin=WebParser
Url=http://www.bom.gov.au[MeasureRadarConfig]
StringIndex=2
Download=1
DownloadFile=Image1.png
...
[MeasureBackImage]
Measure=Plugin
Plugin=WebParser
Url=http://www.bom.gov.au/products/radar_transparencies/[MeasureRadarConfig].background.png
StringIndex=1
Download=1
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Fast changing PNG's with transparencies
If you are sure the background images are not going to change, you could make it more efficient by just downloading them separately and using them in Meter=Image meters with the names hard code and don't use WebParser at all for them. Alternatively, you could Just set a very high UpdateRate like UpdateRate=86400 (once a day) to make sure you get a new one if it does change, while not hitting the site all the time for no reason.
-
- Posts: 62
- Joined: June 29th, 2012, 9:09 am
Re: Fast changing PNG's with transparencies
I like that idea thanks for the confirmation.jsmorley wrote:Just set a very high UpdateRate like UpdateRate=86400 (once a day) to make sure you get a new one if it does change, while not hitting the site all the time for no reason.