It is currently April 27th, 2024, 1:31 pm

Fast changing PNG's with transparencies

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fast changing PNG's with transparencies

Post by jsmorley »

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?
Yeah, WebParser doesn't yet support DynamicVariables=1.
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

jsmorley wrote: Yeah, WebParser doesn't yet support DynamicVariables=1.
No worries, it's an incredible piece of software engineering.

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
then there are two types of images being brought in, as follows

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
Is there any merit to putting a DownloadFile configuration against the static background images, and I'm assuming if I put an UpdateRate on the second type of image it will download from the host site less often?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fast changing PNG's with transparencies

Post by jsmorley »

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.
User avatar
kanine
Posts: 62
Joined: June 29th, 2012, 9:09 am

Re: Fast changing PNG's with transparencies

Post by kanine »

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.
I like that idea thanks for the confirmation.