I want to have a script that will bring up a display dialog (or something similar with a button) that will just stay open in the back ground while a repeat loop is running. Then when you push the button the repeat loop is interrupted and stopped, and thus the script is done.
the other way this might be feasible is if you hold down a key, the script checks for that key and when down the script is stopped.