Script who moves an already placed frame to a new position (x/y)
Hi,
I need help with a simple scriptcode who can move an already placed frame in x=6,99mm / y=4,801 to a new posistion x=10mm / y=10mm
Can anyone please help?
Merry X-mas!
Hi,
I need help with a simple scriptcode who can move an already placed frame in x=6,99mm / y=4,801 to a new posistion x=10mm / y=10mm
Can anyone please help?
Merry X-mas!
Hi,
Hope this help you :
var doc = app.activeDocument;
var mItems=doc.allPageItems;
var len = mItems.length;
while(len--){
var mItem = mItems[len];
var mBounds = mItem.geometricBounds;
var mX = getRound(mBounds[1],3);
var mY= getRound(mBounds[0],3);
if(mX == 6.99 && mY == 4.801){
mItem.move([10, 10]);
}
}
/* round */
function getRound(number, digits) {
digits = (digits) ? Math.pow(10, digits) : 1000;
return Math.round(number * digits) / digits;
}
Regards
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.