How to handle the 'Stop' button event when 'plugin is working...'?

I understand, thanks Kerri. That’s why my initial question was if there was a way to listen for the ‘STOP’ button event, so I could put a if(!stop) statement in the for loop. I’ll see what I can do and send an update.