roguetrip wrote: ↑March 28th, 2019, 4:54 am
Been trying to see if I could cycle StringIndex in webparser weather rss with a timer count. If I toss in a IfCondition and !Setvariable I can see the variable changing yet the meter will not change.
Mind that the skin works if just setting a Static StringIndex. I also tried adding !UpdateMeasure, !UpdateMeter, !Redraw to the conditions but same results.
I had approximately the same question a while back, check
here to see the conclusion. Basically, it's all about point 3) in
this post by jsmorley, which implies that you have to update the WebParser parent with a
!CommandMeasure bang in order to have the dynamic changes like setting a different
StringIndex reflect on its children. Of course, that means loading and parsing the page
again, even if you know the information stays the same. Not setting
ForceReload=1 in the WebParser parent does make this more reasonable, but even so, the whole thing has to be re-read again - it's just the way things work in this aspect.
roguetrip wrote: ↑March 28th, 2019, 4:54 amWould I be correct to say that the webparser gathers its information on the "update cycle" for all StringIndexes and cycling out the string index when out of the "update cycle" will cause this?
Close. It's about the fact that WebParser children are a function of their parent, thus a dynamic change on the children requires an actual update of the parent.
NOTE: If you
really want to dynamically cycle through the capture groups of a parsed webpage without updating the WebParser parent again, the best solution would be to just use String measures instead of WebParser children. That would pretty much do the same: pass the either the whole page or just the part of interest to the String measure, where you'd have to write the regex that provides the desired capture group and removes everything else. Or, if you want to manage this only through one or two String measures, use a regex Substitute to turn the source string into a comma (or any other character) separated string containing only the values of interest, and then get the desired value at runtime by extracting it from that comma separated list in the second String measure, based on the desired index.