Code: Select all
<html>
<body>
<table>
<tbody>
<tr id="entry1">
<td class="entry-title-english">null</td>
<td class="entry-title-japanese">はたらく魔王さま! 2</td>
</tr>
<tr id="entry2">
<td class="entry-title-english">null</td>
<td class="entry-title-japanese">痛いのは嫌なので防御力に極振りしたいと思います。II</td>
</tr>
<!-- The list goes on -->
<tr id="entry362">
<td class="entry-title-english">null</td>
<td class="entry-title-japanese">映画スター☆トゥインクルプリキュア 星のうたに想いをこめて</td>
</tr>
<tr id="lastEntry363">
<td class="entry-title-english">Future Folktales</td>
<td class="entry-title-japanese">アサティール 未来の昔ばなし</td>
</tr>
</tbody>
</table>
</body>
</html>
Code: Select all
[Parser]
Measure=WebParser
URL=file://#CURRENTPATH#animes.txt
RegExp=(?sUi)<tbody>(.*)<\/tbody>
FinishAction=[!UpdateMeasure LastEntry]
UpdateDivider=-1
[LastEntry]
Measure=WebParser
URL=[Parser]
RegExp=(?sUi)id="lastEntry(\d*)".*
StringIndex=1
StringIndex2=1
UpdateDivider=-1
OnChangeAction=[!UpdateMeasure RandomNumber]
[RandomNumber]
Measure=Calc
Formula=Floor((Random / 1000) * [LastEntry])
LowBound=1
HighBound=1000
DynamicVariables=1
UpdateDivider=-1
[PickedEntry]
Measure=WebParser
URL=[Parser]
RegExp=(?sUi).*entry[RandomNumber:].*"entry-title-english">((.*)<.*"entry-title-japanese">(.*)<
StringIndex=1
StringIndex2=1
UpdateDivider=-1
DynamicVariables=1
[Parser] is the parent measure and gets everything inside tbody, [LastEntry] is a child measure and gets the numbesr from id=lastentryXXX
The reason why [Parser] has FinishAction=[!UpdateMeasure LastEntry] is because after the parent measure finishes, for some reason WebParser measures that have UpdateDivider=-1 do update the string value, but not the number value, so I'm doing that to update the number value (also doing it because HighBound=[LastEntry] dosen't work because of the same reason)
So far so good, [Parser] gets the list, [LastEntry] gets the number, [RandomNumber] gets a random number between 1 and the list count, the problem is here, [PickedEntry] is a child measure who's parent has finished before [RandomNumber] could, FinishAction is only executed after the parent measure is done and dosen't work on child measures, Disabled=1, Paused=1, !EnableMeasure, !UnPauseMeasure, !UpdateMeasure, !CommandMeasure X "Update", none of this works.
Question is, how do I update a child measure ([PickedEntry]) who's necesary number is obtained after a parent ([Parser]) and child measure ([LastEntry]) are executed sequentially?
A simple yes or no, pointing out the single line that's wrong or missing options which are wrong is appreciated