Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

scriptEditorInfo [-clearHistory] [-clearHistoryFile] [-historyFilename string] [-input string] [-suppressErrors boolean] [-suppressInfo boolean] [-suppressResults boolean] [-suppressStackWindow boolean] [-suppressWarnings boolean] [-writeHistory boolean]

scriptEditorInfo is undoable, queryable, and editable.

Use this command to directly manipulate and query the contents of the Command Window window.

Note: Due to recent changes, certain flags will no longer work on the Script Editor Window. All flags will continue to work with the CommandWindow (old Script Editor).

Note: This command cannot be used to create a new script editor window.

Return value

stringThe name of the Command Window window is returned.

In query mode, return type is based on queried flag.

Flags

clearHistory, clearHistoryFile, historyFilename, input, suppressErrors, suppressInfo, suppressResults, suppressStackWindow, suppressWarnings, writeHistory
Long name (short name) Argument types Properties
-clearHistory(-ch) edit
Clears the read-only text in the upper field of the Command Window.
-input(-i) string edit
Sets the text in the lower field of the Command Window. Set this value to an empty string to clear the field. Note: this flag only affects the Command Window and not the new script editor. To find out how to manipulate the new script editor please refer to the documentation on the cmdScrollFieldExecuter and cmdScrollFieldReporter.
-historyFilename(-hfn) string queryedit
Sets or returns the name of the file that the Command Window will use to echo all of its history to. If this is an empty string when the -wh/writeHistory flag is set to true, then it will automatically be set to the default file.
-writeHistory(-wh) boolean queryedit
When true, Command Window will echo all of its history to the file defined by the -hf/historyFilename flag. This flag effectively turns file writing on/off.
-clearHistoryFile(-chf) edit
Clear the file defined by the -hf/historyFilename flag, but only if -wh/writeHistory is true. Use this flag to start a new history file, since the default behaviour of the Command Window is to append to the existing file.
-suppressErrors(-se) boolean queryedit
When true, Command Window and Script Editor will not display error messages.
-suppressWarnings(-sw) boolean queryedit
When true, Command Window and Script Editor will not display warning messages.
-suppressInfo(-si) boolean queryedit
When true, Command Window and Script Editor will not display info messages generated by Maya.
-suppressResults(-sr) boolean queryedit
When true, Command Window and Script Editor will not display command results.
-suppressStackWindow(-ssw) boolean queryedit
When true and when the stackTrace mechanism is on, this flag will suppress the display of the stack window. If stack trace is enabled then results will be returned to the output window instead of a separate stack window.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

  // Set the text of the input area of the Script Editor.
  scriptEditorInfo -input "// select -all; delete;";
  // Clear the input area of the Script Editor.
  scriptEditorInfo -input "";
  // Begin recording the Script Editor history to a file called
  // tempHistoryLog.txt in your maya directory.
  scriptEditorInfo -historyFilename "tempHistoryLog.txt" -writeHistory true;
  // Stop recording the Script Editor history
  scriptEditorInfo -writeHistory false;
  // On Windows the following line would print something like "C:/maya/tempHistoryLog.txt"
  // On Linux it would be "~/maya/tempHistoryLog.txt"
  print `scriptEditorInfo -query -historyFilename`;
  // Suppress all warning and info messages
  scriptEditorInfo -e -suppressWarnings true;
  scriptEditorInfo -e -suppressInfo true;