Home Technical Talk

What's the quickest way to get any maxscript into a button/hotkey?

polycounter lvl 14
Offline / Send Message
THE 5 polycounter lvl 14
Mostly maxscripts one can download are macroscripts that just place themselfe in the "Customize User Interface" list and you can drag'n'drop them into your toolbare, but not always the scritp is a .mcr Filetype.
A few minuts aggo I downloaded this script called coctail greeble and it's not a .mcr but a .ms file.
Now my standart workflow for this case was to create a empty script and fill it like this....
macroScript <name> category:"<category>" toolTip:"<description>"
(on Execute do
  fileIn "$Scripts\<Script_that_I_downloaded>.ms"
)
...and then running this script which will place my script in the "Customize User Interface" list, from where I could put it anywhere.
Recently I noticed that the folder where these macroscripts in the list are stored is C:\Program Files\Autodesk\3ds Max 2010\ui\macroscripts.
Now I tried to wrap a macroscript-block arround the scripts working code and just put that new macxroscript in this folder (or Tools/Evaluate All). But for some reason that seems not to work. I did not get the script to work as a button so far, but I did with other scripts bevore using the 1st method I mentioned.

My problem here is NOT that I did not get the one script to work yet. The question is how to genneraly cope with such a Situation. Seeing that you can drag text into max and it will execute it as a script if it is one, but not beeing able to drag a script into a toolbar for a button to appear, I feel like I missed something.

How do you people "Install" scripts? Let's try to find the fastest way.

And yes, I searched and googled before ;p

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    A quick way to do this would be to paste the contents of the MS into the Maxscript Listener, then select all and drag-drop onto the Max toolbar. This creates the proper MCR code for you. You can then edit the MCR by right-clicking the new button.
  • THE 5
    Options
    Offline / Send Message
    THE 5 polycounter lvl 14
    Thanks Eric!
    I tried dragging from the Maxscript window, did not bother to try it from the listener ;p
  • Eric Chadwick
    Options
    Offline / Send Message
    You should check out the MAXScript help file, they have a great section called "MAXScript for New and Casual Users", well worth a look.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    why are you creating a second macroscript file. why not just encapsulate the script as is and save it?
  • THE 5
    Options
    Offline / Send Message
    THE 5 polycounter lvl 14
    You should check out the MAXScript help file, they have a great section called "MAXScript for New and Casual Users", well worth a look.
    I didn't spent any time in learning Maxscript so far, Uni keeps me busy with other stuff :/ But hey, vacation is ahead!
    r_fletch_r wrote: »
    why are you creating a second macroscript file. why not just encapsulate the script as is and save it?
    I tried that with the last script but for some reason that did not work.
    The way I did it was to put the encapsuled script into the macroscripts Folder in the 3ds Max install dir and restarted max, but the script did not appear in the List of installed Macroscripts. I tried with "Evaluate All" too, same. But with a high probability it was a mistake on my side that made the script not appear.


    EDIT:
    I just noticed the macroscripts are not saved in "C:\Program Files\Autodesk\3ds Max 2010\ui\macroscripts" but in "C:\Users\THE 5\AppData\Local\Autodesk\3dsMax\2010 - 64bit\enu\UI\usermacros".
    The Drag and drop script I created the way Eric told me was in there too, called "draganddrop3.mcr". The structure of it was just of the type r_fletch_r said, the script encapsuled into a macroscript block.
Sign In or Register to comment.