How is it possible to create a clipping mask with a illustrator javascript script?
I tried this, but it doesnt work.
var group = app.activeDocument.groupItems.add();
var rect = layer.pathItems.rectangle( height, 0.0, width, height );
rect.moveToBeginning( group );
var ellipse = layer.pathItems.ellipse(ellipseLeft, ellipseTop, ellipseWidth, ellipseWidth);
ellipse.clipping = true;
ellipse.moveToBeginning( group );
What i need is a working code sample