在 photoshop 中访问活动文档路径的子文件夹
Access a subfolder of the active document path in photoshop
请帮忙,这让我很生气。
我的这部分脚本替换了智能对象的内容。
它成功地在 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 );
我已经尝试了我在网上阅读的各种内容,但我对此并不陌生,要么它们不适用,要么我可能错误地使用了它们。
提前致谢。
您需要将您的子文件夹名称添加到 putPath
:
desc217.putPath( idnull, new File (workingPath + "/subfolder/Texture_FOP.tif" ) );
请帮忙,这让我很生气。
我的这部分脚本替换了智能对象的内容。 它成功地在 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 );
我已经尝试了我在网上阅读的各种内容,但我对此并不陌生,要么它们不适用,要么我可能错误地使用了它们。
提前致谢。
您需要将您的子文件夹名称添加到 putPath
:
desc217.putPath( idnull, new File (workingPath + "/subfolder/Texture_FOP.tif" ) );