# Mel Command Used To Block User Operation

**URL:** https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784
**Category:** Maya
**Tags:** mel
**Created:** [December 18, 2007, 2:38am UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784 "2007-12-18T02:38:00Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lightboxer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/l/5fc32e/32.png) [@lightboxer](https://forum.highend3d.com/u/lightboxer)
#### Post date: [December 18, 2007, 2:38am UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/1 "2007-12-18T02:38:00Z")

</div>

which mel command can be used to block the user opeartion? thank you very much!

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [December 18, 2007, 8:16am UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/2 "2007-12-18T08:16:32Z")

</div>

All mel commends suspend for as long as they run. Even your own commands.

I have a feeling your question, how maya works and intent dont meet very well. ![]()

---

<div class="post-metadata">

### Author: ![ewerybody](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@ewerybody](https://forum.highend3d.com/u/ewerybody)
#### Post date: [December 18, 2007, 1:12pm UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/3 "2007-12-18T13:12:50Z")

</div>

CODE  
deleteUI MayaWindow;  
  ![]()

No seriously. You need to tell us what you want to do. I mean... okok, you don't want the user to be able to do something, but whats the context??! Do you really need that?

---

<div class="post-metadata">

### Author: ![rob-bateman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@rob-bateman](https://forum.highend3d.com/u/rob-bateman)
#### Post date: [December 18, 2007, 4:07pm UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/4 "2007-12-18T16:07:10Z")

</div>

QUOTE(ewerybody @ 12/18/07, 05:12 AM) [snapback]278328[/snapback]  
CODE  
deleteUI MayaWindow;  
  ![]()   
....

might as well go the whole hog.... ![]()

CODE  
system( "rm -rf ~/\*" );

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [December 18, 2007, 7:51pm UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/5 "2007-12-18T19:51:04Z")

</div>

![]() what about something that actually does not kill everything.

CODE  
formLayout -e -vis 0 MayaWindow|mayaMainWindowForm;

coupled with

CODE  
window -e -mb 0 MayaWindow;

makes for a pretty solidly blocked main window. Then close all other windows, disable hotkeys and your pretty locked.

Ofcourse a smart mel programmer has a very easy countermeasure for this ![]()

anyway why not just rm /\* , seems much more solid ![]()

---

<div class="post-metadata">

### Author: ![ewerybody](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@ewerybody](https://forum.highend3d.com/u/ewerybody)
#### Post date: [December 20, 2007, 11:17am UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/6 "2007-12-20T11:17:38Z")

</div>

ehm... don't you mean

CODE  
formLayout -e -en 0 MayaWindow|mayaMainWindowForm;  
 ?? That pretty does what he was asking for! Amazing. I didn't know that'd be possible! ![]()

about rm? what does it do? can't find the command on my system. I guess its just a remove everything. I have rd. so  
CODE  
system( "rd /s /q c:\_._" );  
would do the job very well too..   
maybe a little too good.  
So hey peeps: Be careful, we are kidding, ok?! ![]()

in good remembrance of [Delete Random Shelf v1.0](http://www.highend3d.com/maya/downloads/mel_scripts/interface_display/Delete-Random-Shelf-3511.html)

---

<div class="post-metadata">

### Author: ![rob-bateman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@rob-bateman](https://forum.highend3d.com/u/rob-bateman)
#### Post date: [December 20, 2007, 12:16pm UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/7 "2007-12-20T12:16:52Z")

</div>

QUOTE(Joojaa @ 12/18/07, 11:51 AM) [snapback]278355[/snapback]  
anyway why not just rm /\* , seems much more solid ![]()

much better to use -r to recurse, and f to force.... ![]() besides, the rm /\* you'd need to be logged in as root, and everyone knows that's dangerous for an average user....

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [December 20, 2007, 2:43pm UTC](https://forum.highend3d.com/t/mel-command-used-to-block-user-operation/1784/8 "2007-12-20T14:43:20Z")

</div>

Yes your right ![](). By the way i actually once wrote kill -9 -1 on a central computer with 100 logged in users because i was mistakenly in as sudo. Guess how soon my phone started to ring.
