// прямоугольник по текущему артбоарду делает.
mm = 2.834645;
lsd = activeDocument;
lsd.rulerOrigin = Array(0, 0);
lsd2=lsd.activeLayer;
colork = newCMYKcolor(0,0,0,30);
ww=Math.round(lsd.width/mm)*mm;
hh=Math.round(lsd.height/mm)*mm;
rect = lsd2.pathItems.rectangle(0, 0, ww, -hh, false);
rect.stroked = false;
rect.filled = true;
rect.fillColor = colork;
rect.selected=true;
function newCMYKcolor(c,m,y,k)
{
var regColor = new CMYKColor();
regColor.cyan = c;
regColor.magenta = m;
regColor.yellow = y;
regColor.black = k;
return regColor;
}