Let's just start with adding regs/resources to Spellcaster's Keys. Plan out what you would like to have the macro automatically add to the keys for you. I don't normally have sand in my backpack so I don't have Sand in my macro, but use whatever works for you. Make sure you have at least 1 of each resource you want to add in your backpack. Start recording your macro. Double click your Spellcaster's Keys to open the gump. Click on the "Add resource or item" button and target every one of the items to add. Stop recording the macro. Now you'll have to go in and manually edit.
Your macro will look like this at first:
Double Click (0x41BB7ED7)
Wait For Gump (Any)
GumpResponse (Button 25)
Wait for Target
Wait For Gump (Any)
Absolute Target
Wait for Target
Wait For Gump (Any)
Absolute Target
Wait for Target
Wait For Gump (Any)
Absolute Target
.....and so on.
You want to do the following:
1. Remove the "Wait For Gump (Any)" line in the beginning right after double-clicking the keys and add in a 1.2 or so second pause. [right-click Wait for Target/Special Constructs/Inset Pause/Wait/ 1200 milliseconds]
2. Manually remove all the Wait For Gump (Any) lines in the rest of the macro.
3. Add a Pause .70sec after every Wait for Target line.
4. Right-click on all Absolute Target lines and choose Convert to Target by Type.
Your macro should now look like this:
Double Click (0x41BB7ED7)
Pause 1.20sec
GumpResponse (Button 25)
Wait for Target
Pause .70sec
Target by Type Nightshade (0F88)
Wait for Target
Pause .70sec
Target by Type Sulfurous Ash (0F8C)
Wait for Target
....and so on.
How you close out this macro and deal with the other keys is up to you - and there are two different paths to take here. If you would like to create a separate macro for loading each different crafting key, then what you would do here is this:
Go to your Hot Keys tab in Razor. Expand the Targets menu. Assign a hotkey for Cancel Current Target. Go back to your macro and replace the lines after your last targeted resource with another 1 second Pause, then Begin Recording, use your Cancel Current Target Macro, stop recording. The end of your macro should look like this:
Wait for Target
Pause .70sec
Target by Type Sulfurous Ash (0F8C)
Pause 1.00sec
Exec: Cancel Current Target
At this point you would have a complete Spellcaster Key adding macro from start to finish. Feel free to tweak the pauses to suit your connection and patience.

However, it is also possible to chain macros for all the keys together. Instead of adding a Cancel Current Target in, you would tack on another key set the same way you did above: record yourself double-clicking another set of keys, add resources, edit. When you finally have your macro where you want it, then close it out with a Cancel Current Target at the very end.
Important point: Razor does not readily distinguish between different types of ingots, leather, wood, or granite. It naturally sees iron, valorite, and platinum as exactly the same, for example. So creating macros for those resource keys is MUCH simpler than Spellcasters. Instead of targeting each type separately, you create a For/End For loop for however many different types of that resource there are. Using Tailor's keys for an example, there are 11 different types of leather. Since Razor sees them all as "cut up leather (1081)", you'd want to record yourself adding one type of leather to the Tailor's keys and then edit the macro like so:
Double Click (0x442A48D3)
Pause 1.20sec
GumpResponse (Button 999)
Wait for Target
Pause .70sec
For (1 to 11)
Target by Type cut up leather (1081)
Wait for Target
Pause .70sec
End For
The macro will start at the top of the gump list and work its way down in order. It doesn't matter if you don't have all 11 different types in your backpack. Once everything you have has been added, you'll just get a message saying "xxxxxx not found". The macro will still run its course.
Important info:
If there are resources in your immediate area similar to the ones you are trying to add to your keys, the macro may try to grab that instead of what is in your pack, tell you "that is out of range", and get stuck. This would include resources laying on the ground, in containers nearby, or even on corpses. Live monsters and players will not affect the function of the macro.
Though it would be possible to also do this with a Tool House, I don't recommend it because of the potential for making an expensive mistake. If you accidentally added a 4x46 pickaxe in with normal pickaxes, you'd be kicking yourself for days. There is also potential for accidentally mixing in other expensive tools with common ones and it's just not worth the risk.
I hope everyone enjoys this and gets lots of use out of it! If anything I said was unclear or needs further explanation, or if I left anything out, feel free to post questions and I'll help ya out.
