Copy link to clipboard
Copied
Can I apply a script to multiple InDesign projects without waiting for the first one to finish and moving on to the second?"
Copy link to clipboard
Copied
What are you trying to do?
Maybe something like this.
var files = [
"path/to/your/first/project.indd",
"path/to/your/second/project.indd",
// Add more file paths here
];
for (var i = 0; i < files.length; i++) {
var file = new File(files[i]);
if (file.exists) {
var doc = app.open(file);
// Your script logic here
// For example, add a simple text frame
var textFrame = doc.pages[0].textFrames.add();
textFrame.geometricBounds = [72, 72, 144, 288];
textFrame.contents = "Hello, InDesign!";
// Save and close the document
doc.save();
doc.close();
}
}
Copy link to clipboard
Copied
Can I apply a script to multiple InDesign projects without waiting for the first one to finish and moving on to the second?"
By @aghanjar16430960
Not possible in JS.
Or you need to invest in InDesign Server.