求助帮忙修改一个脚本!
内容自动提取到新页面,问题是提取时在新的页面尺寸变成了像数,每次需要修改,有可以帮忙修改成提取也是mm的单位吗,感谢!var SELECTION=activeDocument.selection
//var LeftX=TopY=RightX=BottomY=undefined;
if(SELECTION.length>0){
var VIEW=app.activeDocument.activeView;
var zoom=VIEW.zoom
//centerPoint=app.activeDocument.activeView.centerPoint
VIEW.zoom=1;
var bounds=VIEW.bounds;
var ViewW=bounds[2]-bounds[0];
var ViewH=bounds[1]-bounds[3];
VIEW.zoom=zoom;
if(LeftX){LeftX=undefined;};
if(TopY){TopY=undefined;};
if(RightX){RightX=undefined;};
if(BottomY){BottomY=undefined;};
for(var num=0;num<SELECTION.length;num++){
var SELECTED=SELECTION[num].geometricBounds;
var LeftX=(LeftX==undefined)?SELECTED[0]:((LeftX<SELECTED[0])?LeftX:SELECTED[0]);
var TopY=(TopY==undefined)?SELECTED[1]:((TopY>SELECTED[1])?TopY:SELECTED[1]);
var RightX=(RightX==undefined)?SELECTED[2]:((RightX>SELECTED[2])?RightX:SELECTED[2]);
var BottomY=(BottomY==undefined)?SELECTED[3]:((BottomY<SELECTED[3])?BottomY:SELECTED[3]);
};
var WidthX=RightX-LeftX;
var HeightY=TopY-BottomY;
var CenterX=(RightX+LeftX)/2;
var CenterY=(TopY+BottomY)/2;
var Zoom=(ViewW/ViewH<WidthX/HeightY)?ViewW/WidthX:ViewH/HeightY;
VIEW.zoom=Zoom*0.9;
VIEW.centerPoint=[CenterX,CenterY];
};
//$.writeln (SELECTION.length)
你在发什么鬼东西? 你现在的脚本跟提取对象到新的页面有什么关系?你发了居中并放大选中的对象的脚本 ,你是在灌水么 跟你说的什么修改要求 毫无相关。
页:
[1]