I am executing a command using:
That function does not return until script is done. In the meantime in my scenario it is possible to execute another script through the same function call. How I can detect and cancel script(s) that are running and start a new one?
I tried issue ESC key and cancel command but that did not work (I suspect the reason is that the script is running in a separate thread)