How to Stop a "Repeat / For Loop" in the Middle of the Loop

I'm doing exactly that here: scroll 1 pixel every 50ms ? - #2 by Pal

Note: When I tested different delays and scroll numbers, I sometimes had to press the stop loop shortcut several times to get it to fire, if BTT was too busy.