If you will remember some time ago there was a thread where an extension idea was discussed.
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.
Later to come are bug fixes (if any) and the ability to set the loop index/stop the loop.
Have fun testing!