Scripting Editor - Search Menu

The Search menu o f the Tabbed Scripting 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.

This option is incompatible with Regular Expressions and is disabled when the "Regular Expression" option is selected.

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.