Notifications
Clear all

[Closed] installation help for my own script

Hello,

I have written a couple scripts and they run, but I either don’t fully understand how they install or am just missing something obvious.

So…I have a script file called Color_Menus. In this file I have a script and in that script I have a filein “$scripts/_Myscripts/Machetes Magic Function.mcr” line that contains routines to process the variables setup in the script.

I have a web programming background and am new to MaxScript, so I am thinking that I can use the filein like an include file. However, when I first open 3DS (2009) and import a file, and click on my menu link to activate my script, I get a few different errors about things being undefined.

I am also trying understand the difference or reason behind why there are similar copies of my files appearing in:

C:\Documents and Settings\MyUser\Local Settings\Application Data\Autodesk\3dsmax\2009 – 64bit\enu\UI\usermacros

But if I open the script editor, and save them, then execute them and then goto my menu link, the script functions without error. Can anyone help me and tell me where I am going wrong? Ideally, this will work without user intervention (except for them having to click the menu link) each time 3DS loads…

Thanks!
Machete

3 Replies
 PEN

Your macro scripts need to reside in one of the Macro script folders when Max starts. This way they are executed and running when Max is up. You don’t want to use a fileIn to call a macro but you could do it the other way around, call you .ms file from the macro when it is run.

OH MY! Why isn’t this useful information in the MaxScript help/reference file included with the application…

Thanks so much Professor!