You could change the RegExp to only capture the integer portion from the website... then you would not need worry about Trunc or Round. But you have to use a Calc measure to add a loop value, which simulate website activity between parses, so adding the action to change it to an integer is not in anyway 'overworked'.Mor3bane wrote:hi, Thanks eclectictech
You realised right away what I was aiming for
However, returning the Trunc seems a bit overworked, doesn't it?
Wouldn't there be a capture for the "." with an escape in the Substitute?
I've tried the couple ways I thought would work but both seem to break the nifty addition of commas that attracted me to this thread.
Edit: Also in trying your suggestion, I note that the pop value starts at zero, then resets at 800?
The way my posted code works, I am adding the loop value to the pop value, the pop value is only parsed every 5 minutes from the website (default UpdateRate for the Webparser). This addition simulates what the website is doing without having to hit the site 3 times a second. The pop value is increased by the loop value, then readjusted every 5 minutes by getting the new value from the website.
The update rate of the skin (~390 ms) allows the skin to show a fairly accurate increase of the pop value, while not actually parsing the website constantly. The loop measure has to reset to zero when the new value is parsed, and the pop value in the skin is 'adjusted' to match the website. At that point, the new website value begins to be increased by the loop measure in the skin again beginning at zero.
Because a new value is received from the website every 5 minutes, the 800 value in the loop is enough to provide values to simulate the value the website would have, until it is parsed again. You'll notice it usually only gets to ~600 between updates.
Feel free to use this or not... there are many ways get this done, this was just my suggestion.