The Search menu o f the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for searching and replacing text, jumping to line, offset or bookmark and managing bookmarks.
Find (CTRL+F)-opens the Find dialog.
If a string is selected in the Editor, it is placed in the "Find what:" field automatically.Note that you can search for the currently selected string directly using Ctrl+F3 and Ctrl+SHIFT+F3 without opening the Find dialog.
Previously used search strings can be accessed via the drop-down list.
The default search direction is Down, but can be switched to Up using the "Direction" radio buttons.
By default, the string will be searched for as part of words. Check "Match whole word only" to search for exactly that word.
By default, the search is case-insensitive. Check "Match case" to search for exact match including case.
Check the "Regular expression" option to search using a RegEx. See Regular Expressions Find and Replace in the MAXScript Editor or details on using Regular expressions.
By default, "Wrap around" is checked, meaning that the search will continue from the beginning of the file once the end is reached. To stop at the end (or beginning when searching Up), uncheck this option.
Check the "Transform backslash expressions" to convert special characters prefixed by a backslash like \t, \n etc. into their corresponding characters like <tab>. <newline> etc. For example, entering \n in the "Find what" field and checking this option will find all new line characters in the document. If the option is unchecked, it would only find "\n" verbatim occurrences, for example inside of formatting strings. The escape characters are:
This option is incompatible with Regular Expressions and is disabled when the "Regular Expression" option is selected.
Press the "Find Next" button to find the next occurrence of the search string in the specified direction.
Press the "Mark All" button to add a Bookmark in front of each line with anoccurrence of the search string and close the dialog.
Find Next (F3)- press multiple times to use the last entered search string according to the latest settings in the dialog. Note that the settings are persistent between sessions, so the last string you entered would still be there next time you launch 3ds Max and press F3 or Ctrl+F.
Find Previous (SHIFT+F3)-searches in the opposite direction to the one specified in the Find dialog via the Direction radio buttons.
Replace (CTRL+H)- searches for occurrences of a given string and replaces it with another string.
The Replace dialog provides controls similar to those in the Find dialog. The main difference is the "Replace with:" field which can be used just like the "Find what:" field to either enter a replacement string or select one of the latest replacement strings via the drop-down list.
The "Find Next" button finds the next occurrence of the search string without replacing it.
The "Replace" button replaces the currently selected occurrence of the find string, for example the one found using the "Find Next" button, with the replace string.
The "Replace All" button replaces all occurrences of the find string in the whole document with the replace string.
The "Replace in Selection" button replaces all occurrences of the search string with the replacement string within the currently selected text only. For example, if you want to replace a keyword within a single function only, you could select the function's body and use the "Replace In Selection" button.
Find in Files (CTRL+SHIFT+F) -open the Find in Files dialog.
The Find in Files dialog provides a "Find what:" field to enter the string to search for in specified files.The field is also a drop-down list containing the latest search strings.
The Files field contains by default the typical MAXScript file extensions, but can be used to specify arbitrary file name patterns using wildcards. The field is also a drop-down list containing the latest search patterns.
The Directory field can be used to specify the root directory for the search. The specified directory and all its subdirectories will be searched recursively for files of the given file name pattern containing the search string. The field is a drop-down list containing the latest search paths.
The button to the right of the Directory field can be used to remove one folder name at a time from the path, effectively moving one directory up.
The Browse... button can be used to select a search path via a Get Directory dialog.
The Match whole word only checkbox lets you search for complete words. When unchecked (default), a sub-string search will be performed.
The Match Case checkbox lets you search for the exact word including case. By default, a non-case-sensitive search will be performed.
To search using the specified settings, press the Find button. To cancel, press the Cancel button.
The results of the search will be displayed in the Output pane of the Editor which is hidden either at the bottom or at the right side of the Editing pane.
Double-clicking a search result file name in the Output pane will open that file in a new tab in the Editing pane and will select the line the search string appears on, marking the match with a yellow dot.
Go To (CTRL+G)- opens a Go To dialog which can be used to jump to a specific line number or character offset. The numbers could be copied from error messages in the MAXScript Listener or Debugger. The dialog also shows the current and last line and offset.
Previous Bookmark (SHIFT+F2)-jumps to the previous Bookmark.
Toggle Bookmarks (CTRL+F2)- toggles a Bookmark on / off for the current line.
Clear All Bookmarks- toggles off all Bookmarks in the current document.