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

For multiple selection this script edit help

$
0
0

2 or 3 selection text frame this script run?

selection = app.activeDocument.selection;
for (var j = 0; j<selection.length; ++j);
var doc = app.properties.activeDocument,     myOnjectStyle = doc.objectStyles.itemByName = "myObj1",     myObjects, l;
app.findTextPreferences = app.changeTextPreferences = null; 
app.findTextPreferences.findWhat = "^a"; 
myObjects = (app.selection && app.selection[j]).findText () || doc.findText (); 
l = myObjects.length; 
while(l--) myObjects[l].pageItems[0].appliedObjectStyle = myOnjectStyle;
n = app.selection[j].textFrames.length;   
while (n >= 0)   
{        try {             var islem = app.selection[j].textFrames[n];          islem.appliedObjectStyle = "myObj2";     } catch(_) {}        n--;   
}

Viewing all articles
Browse latest Browse all 15932

Trending Articles



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