Scripting Editor Window

The Scripting Editor is a built-in editor you can open within 3ds Max and use to create or edit text files, notably MAXScript and Python script files. Scripts can be executed from the editor. The editor also provides syntax highlighting for other common text formats, like HTML and XML.

To open the Editor,

MAXScript opens the selected script in a tab inside the modeless Scripting Editor window:

The Scripting Editor is suited for developing longer scripts or code fragments you want to keep. You can edit and test parts of them until they are complete, then save your code in a script file for later use. This is a common method for developing large scripts, utilities, and function libraries.

You can select one or more text lines and drag them to a 3ds Max toolbar to create a Macro Script containing the selected lines. For more information, see Defining Macro Scripts.

You can open a Scripting Editor tab from within the Listener or from other running scripts by calling the edit() method. The syntax for the edit() method is:

edit <filename_string>

where <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the file whose contents are to be loaded into the new Scripting Editor window.

EXAMPLE

   edit "my_script.ms"

or

   scriptfile="my_script.ms"
   edit scriptfile

The file will be searched for in the following directories, in the order listed:

The MAXScript System Global Variable editorShowPath controls whether the Scripting Editor will display the full path of the edited script (true) or only the file name in the title bar (false).