#target photocuapp.bringToFrontshop);
if (documents. length == 0) {
alert("沒有可處理的文檔");
} else {
var visibility = false;
var docRef = activeDocument;
var layers = docRef. layers;
if (layers.length == 1 && docRef.activeLayer.isBackgroundLayer == 1) {
alert("The Background layer can not be hidden when it is the only layer in a document.");
} else {
for (var i = 0; i var tempName = "name" i;//修改後的名稱
layers[i]. name = tempName;
}
}
}
將上面的程式碼儲存為.jsx文件,在ps中作為腳本運行。
只能支援全部圖層模式,對群組還不起作用