When 3ds Max first starts, MAXScript searches for any startup script files, which it then automatically loads and runs. This feature is useful if you have function libraries you always use and want preloaded, or if you want to establish custom UI settings, define scripted plug-ins, or load scripted utility rollouts.
MAXScript first searches for in the ui\macroscripts directory. These MacroScript definitions are not compiled at this time; rather they are just scanned to identify the MacroScripts that have been defined.
MAXScript next searches for MAXScript files ( , , and ) in the plug-in path directories (defined on the and ) and their subdirectories, and compiles these files. The base scene and user interface have not been created at this point, so no viewport or scene commands should be executed in these files. These files should primarily define scripted plug-ins and utility functions.
Any utility functions used by the macroScripts defined when reading the ui\macroscripts directory should be defined in a .ms or .mse file in one of these directories. You can prevent a nested directory from being scanned by placing its name in parentheses, for example "(old-versions)", allowing you to enable and disable scripts in handy directory-based groupings.
MAXScript then recursively scans the Startup Scripts directory (defined on the Configure System Paths dialog) and any nested directories for .ms, .mse, and .mzp script files and loads them. In this pass, any script files with the name startup.ms are ignored. You can prevent a nested directory from being scanned by placing its name in parentheses, for example "(old-versions)", allowing you to enable and disable scripts in handy directory-based groupings.