use code from Drawscript, illustrator extension