Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Command in Java for "all opened documents"

$
0
0

I have a script that needs modification. Thank you all in the forum for helping me design this script from start btw!

 

Anyway, this is the script.

 

var myDoc = app.activeDocument;

app.findGrepPreferences = app.changeGrepPreferences = null;

// Change "Condition 1" to name of your condition

myConditionList = app.activeDocument.conditions.everyItem().getElements();

 

for (i=myConditionList.length-1; i>=0; i--)

{

    if (myConditionList[i].visible == false)

    {

        myConditionList[i].visible = true;

        app.findGrepPreferences.appliedConditions = [myConditionList[i].name] ;

        app.findGrepPreferences.findWhat = ".+";

        myDoc.changeGrep();

        app.activeDocument.conditions.item(myConditionList[i].name).remove();

    }

}

 

I'm looking for a variable that can apply for "all" opened documents rather than the active one only. I'm having difficulty finding the right command.

 

BTW, the script removes all hidden text and objects.


Viewing all articles
Browse latest Browse all 15932

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>