Trying to make a cancel-able python script on mac in rhino 6.
script:
import rhinoscriptsyntax as rs
import Rhino
def TimeConsumingTask():
for i in range(10000):
# Was escape key pressed?
Rhino.RhinoApp.Wait()
rs.Sleep(1)
if (scriptcontext.escape_test(False)):
print "TimeConsumingTask cancelled."
break
print i
TimeConsumingTask()
I found these commands to try and help escape_test be detected, but no luck.
Rhino.RhinoApp.Wait()
rs.Sleep(1)
Anybody have a fix for this or should it be reported as a bug?
Cheers
2 posts - 2 participants