How is this done?Just place this script in your scriptsstartup directory.
How does it work?It dynamically creates a .reg file - filling in the data for the instance of max that is running. It then runs the .reg file - and then it registers max as an OLE interface server.
The .reg file is created in your '$scripts' directory - is deleted when it's finished. If you don't want to delete it - then just comment out the deleteFile call in the script.
The good news about this - is that no interaction with dialog boxes is necassary when calling a command through the maxscript 'doscommand' function. (As you all know - manually editing the registery via a .reg file requires human interaction)
Any Limitations?It will only work on one version of Max at a time. When multiple installations are running at the same time - it will only work for the first one. For instance:
- Open Max 8 -
- Open Max 9 -
- Evaluate a script in your favorite text editor
Results: The script is evaluated in Max 8. Apparently once registered - it can't be forcibly released by an outside app.
- Now close Max 8
- Evaluate a script in your favorite text editor
Results: The script is evaluated in Max 9.
To give feedback / ask questions -
view the original post at cgtalk