GENERATE/PREV.gifGENERATE/NEXT.gif

The Scripts Directory

Script files reside by default in the scripts sub-directory within the MAX root directory, which is usually c:\Max\scripts. Functions that open scripts, such as >SPinclude(), >SPfileIn(), and >SPedit(), search the scripts directory first, then the MAX root directory, and finally the directories specified in the PATH environment variable. This is also the search order for the startup script startup.ms.

You cannot alter this default directory from within MAX, as you can with the scene, image and map directories. However, because MAXScript searches all directories for script files that are specified in the Windows PATH environment variable, you can effectively control the placement of this directory using the PATH environment variable. You can access the variable through the Windows System Control Panel.

An auto-load startup folder exists inside the scripts folder. Any script files you place into that directory will be automatically run when MAXScript starts up. MAXScript first loads the startup.ms boot file, then scans the Startup folder for *.ms and *.mse files and loads them.