這裏的操作管理器代碼,你會看到ScriptingListener.log:
// =======================================================
var idFl = charIDToTypeID("Fl ");
var desc62295 = new ActionDescriptor();
var idUsng = charIDToTypeID("Usng");
var idFlCn = charIDToTypeID("FlCn");
var idcontentAware = stringIDToTypeID("contentAware");
desc62295.putEnumerated(idUsng, idFlCn, idcontentAware);
var idOpct = charIDToTypeID("Opct");
var idPrc = charIDToTypeID("#Prc");
desc62295.putUnitDouble(idOpct, idPrc, 100.000000);
var idMd = charIDToTypeID("Md ");
var idBlnM = charIDToTypeID("BlnM");
var idNrml = charIDToTypeID("Nrml");
desc62295.putEnumerated(idMd, idBlnM, idNrml);
executeAction(idFl, desc62295, DialogModes.NO);
它有點嚇人,但它可以很容易地修改,以類似的東西:
function contentAwareFill() {
//works only with selection
try {var SB = activeDocument.selection.bounds}
catch (e) {alert('content aware fill needs a selection'); return};
//100% opacity, normal blending content aware fill
var desc = new ActionDescriptor();
desc.putEnumerated(charIDToTypeID("Usng"), charIDToTypeID("FlCn"), stringIDToTypeID("contentAware"));
executeAction(charIDToTypeID("Fl "), desc, DialogModes.NO);
}
我沒有一個回答,但是您可以在專用於腳本的論壇中查看是否有答案 - > PS腳本(http://www.ps-scripts.com/bb/viewforum.php?f=29&sid=a96b63c16da222fd796821eaa0ec6747)。 –