请帮助,这使我发疯。
我的脚本的这一部分替换了智能对象的内容。 它成功地在activeDocument.path中找到了要替换的文件,但是我一生都无法获取它来访问要存储所有图像的子文件夹。为了避免在与PSD相同的文件夹中包含大量文件。
var idplacedLayerReplaceContents = stringIDToTypeID( "placedLayerReplaceContents" );
var desc217 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var workingPath = app.activeDocument.path;
desc217.putPath( idnull, new File ("Texture_FOP.tif" ) );
executeAction( idplacedLayerReplaceContents, desc217, DialogModes.NO );
我已经尝试过在线阅读的所有内容,但是对此不熟悉,或者它们只是不适用,或者我可能使用了错误的东西。
谢谢。
答案 0 :(得分:0)
您需要将子文件夹名称添加到putPath
:
desc217.putPath( idnull, new File (workingPath + "/subfolder/Texture_FOP.tif" ) );