Shake Macro'd Add Script
Understanding The UI Script:
Above is a look at the UI.h file in Smultron. As you can see most script editors will color code specific things for you depending on the programming language you use, and in this case I want you to look carefully at some of the areas marked in red, for these are what you will be changing manually depending on what you may do different. Lets take a look at a few of the different lines of code (defined on the left side).
Line 5 - the void function:
Looking at C programming, the "void" function is a pointer that links to internal and external commands. It will be pointed down to the variable command in line 13 which tells shake what it is doing when you press that specific button within the toolbox in shake. (sorry if that is all confusing but I could not think of any other better way of putting it.
Line 7 - the addScript Location:
There is that word "void" again. This time it is pointing back to the actual void function titled addScript. inside the "" you will see the exact directory of the shake script we built in page 1. If your location is different for that shake script, you need to specify its location in this string.
Line 12 - Button Location:
In this line where it says "User" it is obviously defining the toolbox the button will be placed within shake.
Line 13 - The button Look:
The Toolbox item is currently "basicGlow@" and this is SUPPOSED to be "@basicGlow" like I had you copy and paste earlier but I messed up while typing that example. If you remove the @ from the string, Shake will automatically look to the "/nreal/icons/" directory for a .NRI image to be used as the new look for the UI button. By leaving the @ there, it will still place the button but only give you plain text on top of it.
Go ahead and give this macro a try inside of shake. It will automatically do an addScript from the defined location into your current shake script. I hope you Enjoyed this tutorial and I hope it was at least somewhat helpful. I would like to give special thanks to the User DavidW for your help getting the addScript command correct.