MAXScript Introduction > The MAXScript Editor > MAXScript Editor Configuration And Customization >

# MAXScript Editor - Defining Custom Keywords

| MAXScript Editor | MAXScript Editor Property File Settings

The MAXScript-specific language settings of the Tabbed MAXScript Editor introduced in 3ds Max 2008 can be customized by editing the file MAXScript.properties located in the 3ds Max root folder to include user-defined keywords that are not part of the MAXScript language.

This could be used for example to highlight project-specific variable names etc.

## Global Settings

To define custom keywords to be colorized in the source code of MAXScript files, follow these steps:

- Open the MAXScript Editor.
- Create a new Script and enter in it: "So long and thanks for all the fish.[New Line] Earth is mostly harmless"

- The result should looks like this:

- In the Tools menu of the Editor, select the item "Open MAXScript.properties"

- In the MAXScript.properties file, locate the section remarked with

  #keywords12 is for user defined words to be colorized. Keywords are checked for in this list first.

- You can add keywords to the keywords12.$(file.pattern.MAXScript)= definition. Make sure to use \ at the end of each new line.
- For example, enter the following words: so long thanks all the fish mostly harmless
- Press Ctrl+S to save the file MAXScript.properties.

NoteIf you don't have enough access rights to save the file to the root folder of 3ds Max due to the User Account Control (UAC) settings of your Windows OS, please see the Local User Settings section further on this page.

The resulting formatting should look something like this:

## Modifying The Color And Style Of Custom Keywords

As you can see, the default color for user-defined keywords is red and the style is bold italic.

- This can be changed in the color definition of Keywords12 which can be found in the same MAXScript.properties file.

- Scroll down in the MAXScript.properties file and locate the lines

  # Keywords12 - User defined

  style.MAXScript.23=fore:#FF0000,bold,italics

- You can change this definition to give your own keywords the desired color and style.

- For example, remark the existing line using # and enter the following instead:

  style.MAXScript.23=fore:#0040F0,bold

- Then press Ctrl+S to save. The result will be something like:

As mentioned in the remark to the keywords12 definition in the MAXScript.properties file, keywords are ALWAYS checked for in the user-defined list before checking the language-specific definitions (which in the case of MAXScript are exported automatically).

In the above example, the keywords "and" and "for" are colorized as part of the language (logical AND operation and FOR loop). If we would include them in our custom keywords list, they would be colorized in brighter blue instead of dark blue and would override the language-specific settings:

## Local User Settings

On modern Operating Systems like Vista and Windows 7 with User Account Control (UAC) enabled it might be impossible to modify the factory settings provided by the MAXScript.properties file becase the file is located in the root of 3ds Max. For that reason, it is advisable to provide the custom settings using the "User Options File" also available through the Tools menu of the Editor.

- If the file does not exist, it will be created automatically in the Local settings folders of the current user's account. The name of the file will be "MXS_EditorUser.properties" and it can override any settings normally found in the global "MAXScript.properties" file.

- Copy the custom keywords definition and the color definition for keywords12 into this file and save it by pressing Ctrl+S:

- The resulting colorization of user-defined keywords will be the same as in the examples above, but independent of the 3ds Max installation. For example, reinstalling 3ds Max but preserving the Local User settings will also preserve all overrides entered in the MXS_EditorUser.properties file.

| MAXScript Editor | MAXScript Editor Property File Settings