If you will remember some time ago there was a thread where an extension idea was discussed.
Please login to see this link.
I figured out an extremely simple way to do this where the only needed code would be in the condition.
I finished a small beta version with a condition for the loop, and expression to get the loop index, and an example file explaining how to use it.
Please login to see this link.
Later to come are bug fixes (if any) and the ability to set the loop index/stop the loop.
Have fun testing!