Hi, I want to “loadFilesIntoStack” the 2 opened documents. Is there a way to have the “Add Open Files” and “Attempt to Automatically Align Source Images” already set in the code (not with the popup window).
Thanks,
fred
async function TEST() {
let commands = [
// Scripts
{
"_obj": "AdobeScriptAutomation Scripts",
"javaScriptMessage": {
_obj: "loadFilesIntoStack",
_target: [
{
_ref: "document",
_id: documentIds[0]
},
{
_ref: "document",
_id: documentIds[1]
}
]
},
"javaScriptName": "Load Files into Stack..."
}
];
return await require("photoshop").action.batchPlay(commands, {});
}
const openDocuments = await app.documents;
const documentIds = openDocuments.slice(0, 2).map(doc => doc.id);
const result = await require("photoshop").core.executeAsModal(TEST, {"commandName": "Action Commands"})
console.log("documentIds", documentIds)