- 2023-02-01Aijs 每个画板单独存PDF
vardoc=activeDocument;varpt=72/25.4varnum_layer=undefined;//拿到图层写了数量的for(vari=0;i<doc.layers.length;i++){varlayer=activeDoc
- 2023-02-01aijs 关于 获取 类型的 constructor很多有用的信息
varve=app.version;try{if(ve.split(".").length>1){ve=eval(ve.split(".")[0]);}else{ve=eval(ve);};}catch(e){ve=17;};if(ve>16){va
- 2023-02-01aijs 遍历字典
varperson={fname:"John",lname:"Doe",age:25};for(xinperson){alert("key"+x)alert("value"+person[x]);}
- 2023-02-01aijs 对象排序
1.字典对象functiondictGetValue(value){for(dictGetValueIndexinvalue)returnvalue[dictGetValueIndex]}functiondictGetKey(value){for(dictGetKeyInd
- 2023-02-01aijs 添加图形 线条与矩形
varcanvas=activeDocument.groupItems.add();varpt=72/25.4;//把需要添加的图形放入列表varshapes=newArray();shapes.push(newShapeLine(0,0,20,20,0.2,
- 2023-02-01aijs描边填色
s=app.activeDocument.pathItemsmm=72/25.4sp=SPOT("diecut")for(vari=0;i<s.length;i++){varw=s[i].width/mm;varh=s[i].height/mm;
- 2023-02-01aijs 删除隐藏图层
for(vari=activeDocument.layers.length-1;i>=0;i--){varlayer=activeDocument.layers[i];if(!layer.visible){layer.visible=true;layer.re