Thanks Amy - it was useful to have a play around with the effect of putting certain code components in different windows (end routine,each frame etc) but it didn’t fix my problem, nor did the other growing list of threads on conditional loops in the forum. Not sure where to go next.
Cheers,
Tom