I've never had it hang maya, it just stops and sits there until you press cancel.
I wish someone who is good with mel would fix up the script a little, so if there's a error you could just press continue.
I also found this in another post, for making swatch by hand.
It's actually very easy but may be slightly time consuming depending on how many shaders you have.
Make a sphere (or whatever shape)
Apply the shader to the sphere
Render it
Right click on the rendered image, go to View and choose Grab swatch to Hypershade/Visor.
Drag a region around the render
Drag the render from that window onto your shader
node in the Hypershade
It's that easy!