If you want to assign a script to a keyboard shortcut you’ll need to jump through a couple of small hoops to get it done.
First, in Max, go to Customize > Configure System Paths. Check where Max is looking for you’re “Additional Macros” and go there in explorer (you can double click the path in max and it’ll whisk you there).
If you already have some *.mcr files in there then copy one for us to edit, if not create an empty text file and change it’s extension from txt to mcr. Open up the new file and delete any text that’s inside and the copy this chunk of text in:
macroScript HideBones
category:”MyScripts”
toolTip:”"
(
filein “C:3dsMax2009ScriptsCustomHide_Bones_Toggle.ms”
)
Let’s just run through the code I got you to paste in. It’s nothing that complicated, just a script name, category and file path really. The macroScript HideBones part is simply the name I want to use for this script and category:”MyScripts” is the category we’ll find it under when assigning the shortcut to it. filein is the path to the script we want to launch, make sure you point this to where the script you want to launch is.
We’ve now laid the groundwork for our shortcut, now it’s just a couple more steps to set it up. Back inside Max, go to Customize > Customize User Interface. Under the Keyboard tab set Group to Main UI and Category to MyScripts. You’ll now have a list of actions and their assigned shortcuts listed. Select HideBones and then click inside the Hotkey box. All you need to do is press your desired keyboard shortcut and click Assign. I used shift + b for this shortcut but you can use whatever you want, if you try something that is already used it’ll show up in the Assigned to box. Finally, click Save… and save your custom keyboard shortcuts somewhere and you’re ready to rock!