• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Indesign script

Participant ,
Jun 30, 2024 Jun 30, 2024

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?"

TOPICS
How to , Performance , Scripting

Views

69

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2024 Jun 30, 2024

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();
    }
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 30, 2024 Jun 30, 2024

Copy link to clipboard

Copied

LATEST
quote

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. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines