MAXScript Introduction > The MAXScript Editor > MAXScript Legacy Editor Windows >

# MAXScript Legacy Editor Commands

The following menu bar commands and keyboard shortcuts were available in the Legacy MAXScript Editor.

The edit commands listed below were also available in the MAXScript Editor right-click menu.

File > New,CTRL+N

  Opens a new MAXScript Editor window for writing a new script.

File > Open,CTRL+O

  Opens a common File Open dialog for choosing an existing script. A new MAXScript Editor window then displays the selected script.

File > Close,CTRL+W

  Saves the contents of the MAXScript Editor to the current file name, and then closes the Editor window. If there is not a current file name (that is, the MAXScript Editor window was opened with File > New), a common File Save dialog is opened.

File > Save,CTRL+S

  Saves the contents of the MAXScript Editor to the current file name. If there is not a current file name (that is, the MAXScript Editor window was opened with File > New), a common File Save dialog is opened.

File > Save As

  Opens a common File Save dialog for choosing a new file name used to store the existing script.

File > Evaluate All,CTRL+E

  Evaluates the entire contents of the MAXScript Editor. This is similar to selecting all text, and then pressing SHIFT+ENTER. It has the advantage that the window's scroll position does not change.

Edit > Undo,CTRL+Z

  Undoes the last change made to the MAXScript Editor’s content.

Edit > Undo,CTRL+Y

  Redoes the undone changes made to the MAXScript Editor’s content.

Edit > Cut,CTRL+X

  Copies the selected text to the cut/paste buffer and deletes the text.

Edit > Copy,CTRL+C

  Copies the selected text to the cut/paste buffer.

Edit > Paste,CTRL+V

  Places the text in the cut/paste buffer at the cursor. If text is selected when executing this command, the selected text is replaced with the cut/paste buffer contents.

Edit > Delete, DEL

  Deletes the selected text.

Edit > Select All,CTRL+A

  Selects all text in the MAXScript Editor.

Search > Find,CTRL+F

  Displays Find dialog. Performs search in the MAXScript Editor for the Find What text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters as the Find What text. If matching text is found, the text is selected.

Search > Find Next,CTRL+G

  Repeats the last Search > Find by finding and selecting the next occurrence of the Find What text.

Search > Replace,CTRL+H

  Displays Replace dialog. Performs search in the MAXScript Editor for the Find What text, and replaces the matching text with the Replace With text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters in the specified text.

Help > Help

  Displays the MAXScript Online Reference.

Help > About MAXScript

  Displays About MAXScript dialog.

TAB,CTRL+I

  Indents selected lines of text by one tab width.

SHIFT+TAB, SHIFT+CTRL+I

  Unindents selected lines of text by one tab width.

SHIFT+ENTER

  A MAXScript Editor can send code selections to Listener for evaluation. Select some text in MAXScript Editor and press SHIFT+ENTER to send the selected text to Listener. Listener compiles and evaluates it and prints out the result at the end of the current text in Listener. If you press SHIFT+ENTER with no text selected, the line containing the cursor is sent to Listener for evaluation. This behavior is similar to using SHIFT+ENTER in Listener, except that the results of the evaluations are printed in the Listener, not inserted into the MAXScript Editor text.

  If you have a number pad on your keyboard, the Number-Pad ENTER key is an alternative to SHIFT+ENTER and can be used to execute commands. You may find the Number-Pad ENTER key faster and easier to use.

CTRL+Right-Click

  Displays a pop-up menu of all the utility, structure, user-interface item, function, handler, plug-in, tool, Macro Script, and rcmenu definitions that exist in the current script. Select one of the items in the pop-up menu to position that definition at the top of the MAXScript Editor window. This simplifies large script navigation.

CTRL+B

  Selects the text in the current bracket. Bracket balancer lets you check bracket balancing in long bits of code. The balancer works with any of the following: (), [], and {}. To use it, place the cursor anywhere in the script text and press CTRL+B. If the cursor is next to a bracket, the code bracketed by it and its matching bracket will be selected and highlighted. If the cursor is not next to a bracket, the closest bracketed code containing the cursor will be selected. If you press CTRL+B again, the next outer bracketed fragment is selected, and so on. You can keep pressing CTRL+B to move out through bracket nestings. If at any point there is a bracket mismatch, the balancer will beep and not select any text.

CTRL+D

  Performs a simple syntax coloring scheme in the MAXScript Editor. Each time you press CTRL+D, the window is redrawn with comments in green, MAXScript reserved words in blue, and string literals in dark red. This often helps in reading large, complex programs. New text is always colored black and you have to press CTRL+D at some point to recolor the script. Syntax coloring is a programming aid and does not effect script execution.

  Script files will be automatically syntax colored when opened. Automatic syntax coloring as you type in the Editor will also be performed, but only on single line basis. Comments and strings spanning multiple lines will not be colored properly - please use Ctrl+D in such cases to force a manual update.

CTRL+R

  Places the cursor at the location where it was previously placed with a mouse click or a find operation. Consecutive uses of CTRL+R cycle through the last eight cursor positions. This feature is useful if you edit at one location, move the cursor elsewhere with find or scroll operations, and then want to return to the edit location. This feature allows you to quickly review the code pieces you recently worked on.

CTRL+J

  Opens a modal "Go To Line Or Character" dialog which lets you enter a line and/or character position to jump to. This feature could be used for example with the line and character numbers found in the output of the Debugger or in an error message in the Listener in 3ds Max 8 and higher. The default values in the dialog will be set to the current cursor position.