Something like this works correctly: var fColor; fColor = new CMYKColor(); fColor.cyan = 0; fColor.magenta = 0; fColor.yellow = 0; fColor.black = 100; var left = 100; var top = 100; var WidthRect = 200; var HeightRect = 200; var mFactor = 50; makeQI (left, top, WidthRect, HeightRect, mFactor, fColor) function makeQI(left, top, WidthRect, HeightRect, mFactor, fColor) { alert (left); // try this to see the correct variables //alert (top); //alert (WidthRect); //alert (HeightRect); //alert (mFactor); var pItem = app.activeDocument.pathItems.rectangle (top, left, WidthRect, WidthRect, false) pItem.filled = true; pItem.fillColor = fColor; pItem.resize(mFactor,mFactor,true,false,false,false,100, Transformation.TOPLEFT); } But you don't read carefully. xDim is available, but not kxDim ...
var position = new Array ( origin[0] + toPoints(xDim*11 + xDim*3 + xDim*5 + xDim*3 + xDim*7*12 + xDim*7), origin[1] - toPoints(bHeight) - toPoints(kXDim*1.5) );
alert (position) // shows you the position - correct or not
// but there is no kXDim yet ??? ...
... View more