View Full Version : Maxscript keyboard shortcuts?
09-02-2005, 06:36 AM
Anyone know if its possible to assign a keyboards shortcut to a button in a maxscript?
I've got one that copies a vert weight, and then pastes it to another vert. Adding a shortcut for copy and one for paste would save me ages.
09-02-2005, 08:11 AM
You can do something following:
Let's say this is the script with the rollout and the button that you want to press:
<font class="small">Code:</font><hr /><pre>rollout testRlt "Test Rollout"
button testBtn "Press Me"
on testBtn pressed do (print "Button pressed")
testFltr = newRolloutFloater "Test Floater" 150 60
addRollout testRlt testFltr</pre><hr />
You would make a new macroscript that basically just says something like this:
<font class="small">Code:</font><hr /><pre>testRlt.testBtn.pressed()</pre><hr />
Then assign that one to a hot key. You'd have to make a seperate macroscript for each button. And you might have to declare the main rollout as global in the original script. Also, the rollout would have to be open for the other button pressing scripts to work.
Hope that helps.
09-02-2005, 11:44 PM
When I need to make a keyboard shortcut quickly I just select the text from the listener or script window and drag and drop it onto a tool bar.
Then if you go to Customize User Interface/Keyboard and look in the "Drag and Drop" Category you'll find the script you just dropped.
It's pretty handy.
Lately I just have a toolbar called "Temp" and I just drag and drop scripts to it all the time. I don't even bother with the hotkeys anymore.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.