I have MEL script w/ big time of execution w/ internal loop. And I want to stop exec. of this script by keypress or mouse click on button..
My var. w/ flag and mouse click on a button don't work because I can't to press button on my GUI so far as scripts not end exec. (I tried cursorwait but it is was unuseful for me .... )
I'm not %100 certain but I don't think you can stop a MEL script. I suppose if you wanted you could put a routine in there that would popup a window after it's been running for so many cycles and then you click okay to proceed or exit. If you are trying to kill a runaway script there may not be a way at all.
But can you (now I can't because dont have exp. w/ it) create plugin? This plugin will be get press "Esc" button on keybord. and after it setup some global flag ???
Ok may be you know somebody who can write this little plugin ??? Or how to lead someone to write it ... I think it will be usefull for all user of Maya !!!!!
I know about trick w/ file deleting or present... I did it by to ways by pass some comand in mel "system(xxx) " or by mel "file -ex " but I think it is unpretty for "normal" user.. "Normal" user want to hit "esc" buttom....