Run a MEL script

  1. Click the Script Editor button in the bottom right of the main Maya window, or select Windows > General Editors > Script Editor to open the Script Editor.

    The Script Editor lets you type in longer, multi-line scripts and see their output in the history pane.

  2. Type your script in the bottom pane of the Script Editor window.
    Note:

    In the Script Editor, you can use auto-completion to help you find command names more quickly. For more information, see Get help on a MEL command.

  3. To execute the script do any of the following:
    • Press the Enter key on the numeric keypad.
    • Select Command > Execute.
    • Select the text you want to execute and press Ctrl + Enter.

    The script and the result appear in the top pane.

    The Script Editor history pane shows you the line numbers that the errors have occurred on. You can turn off this option by selecting History > Line numbers in error.

    You can turn off the line numbers in the bottom pane by selecting Command > Show line numbers.