needs some code and I can't figure out
how to make it work.
Loads a file of numbers - say 152.
Processes selected number - say 100.
A button to process next say 10 numbers -
so that stats can be calculated after each
ten additional numbers have been processed
Clicking the button for "Next 10" works fine
until the number of items left is < 10 + X
where X is probably 9.
Having processed 100 numbers and clicked
the "Next 10" button four times we've
processed 140 numbers. So numbers left
is 12 - which more that 10.
And this is where the problem lies.
Checking before processing 10 numbers
is "spinCount - processedCount > 10"
Of course as each number is processed
"processedCount" increases by 1 until
"spinCount - processedCount" is < 10"
so not all of these 10 numbers are process and
there's an error - even though there were
10 numbers available when the processing
started.
What I need is a way to process the loop
when there are 10 numbers available at
the start but not at the end of the loop.
The code I have doesn't handle this but
I'll include it anyway...
fileString contains the numbers from the loaded file.
"btnVar2" label is 10.
Code: Select all
if processedCount + the label of button "btnVar2" < spinCount then
repeat with i = 1 to the label of button "btnVar2"
send mouseUp to button ("btn"& item processedCount + i of fileString)
end repeat