MAXScript Editor - Search Menu

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.

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 an occurrence of the search string and close the dialog.

- Press the **"Close"** button to close the Find 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.

    ![](../../../images/GUID-6370C8F1-865B-4D78-9742-380EC83EDA20-low.gif)

    - 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.

    ![](../../../images/GUID-1FBED8DC-EC0A-4F62-84E9-9F32EEEDCEF7-low.gif)

    - 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](../MAXScript-Editor-Output-Pane.html) 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.

        ![](../../../images/GUID-4EDE6D25-6506-4DA7-BBBF-B126BD99EF43-low.gif)

Previous Topic

MAXScript Editor - Edit Menu

Next Topic

MAXScript Editor - View Menu