How to stop execution of script?

Hi !!!

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 .... )

Any suggestion ???

   -- Khar

Konstantin Kharitonov, Moscow
khar_khar@mail.ru

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.

---a note from our sponsor---
Have you tried searching highend3d?

www.gmask.com

Ok !!! I understand MEL good but not too match..

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 ???

It is teoritical posible ???

   -- Khar

Konstantin Kharitonov, Moscow
khar_khar@mail.ru

Yes, it's possible in plugin to check if ESC key was pressed and then return the value out whether it was pressed or not.

rokl

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 !!!!!

Highend3d people help me please !!!!! :sunglasses:

   -- Khar

Konstantin Kharitonov, Moscow
khar_khar@mail.ru

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....

Any suggestion about wanted plugin ????

   -- Khar

Konstantin Kharitonov, Moscow
khar_khar@mail.ru

And now vioala !!! I released my new scripts
Archived Rib Output v1.5. w/ some new feachers and interrupt by key ..

Very big thanks to Rok Andic for good plug-in KeyInterrupt v.1.0

Some suggestion to Rok:

  1. Please doit Irix ver. of this tool !!
  2. And please use release ver. because I think you put to Highend debug ver.
  3. Try use zip arc. when you put tools to Highend

Once again big thanks to You !!!

   -- Khar

Konstantin Kharitonov, Moscow
khar_khar@mail.ru