A little more background on what you're specifically trying to do would be helpful.
Are scriptable wizards out of the question for your needs? http://unity3d.com/support/documentation/ScriptReference/ScriptableWizard.html If you want an editor script to "do something" with a material, you can do that pretty easily.