My script is launched from the ScriptUI Panels (so it's a Window). In the script user interface, there are two buttons: "Start" and "Stop". When you click the "Start" button, the script executes a sequence of commands in a loop. The "Stop" button is supposed to stop this loop (it does this by setting a loop condition to false). But when the "Start" button is pressed, the script UI becomes unresponsive.
Any idea how to make it (the UI) responsive so the "Stop" button can be clicked?
.update() doesn't work with scripts in the ScriptUI Panels.