Copy link to clipboard
Copied
Hi All,
If possible to find the nested style's override (contents) with script?
Example here:
1. The first line is Nested.
2. the italic word is nested override.
Hi, try this code.
styleOverridden property will help you to found overriden
var doc = app.documents[0];
var story = doc.stories[0];
var tsr = story.textStyleRanges;
for (var i=0, len=tsr.length; i < len ; i++) {
if (tsr.styleOverridden) {
$.writeln(tsr.contents);
$.writeln(tsr.index);
}
};
thankyou
Copy link to clipboard
Copied
Hi, try this code.
styleOverridden property will help you to found overriden
var doc = app.documents[0];
var story = doc.stories[0];
var tsr = story.textStyleRanges;
for (var i=0, len=tsr.length; i < len ; i++) {
if (tsr.styleOverridden) {
$.writeln(tsr.contents);
$.writeln(tsr.index);
}
};
thankyou
Copy link to clipboard
Copied
Hi Milligramme,
Thank you so much for your help, your effort more valuable for me.
Here is my target.
var doc = app.activeDocument; | |
var story = doc.stories.everyItem().getElements(); | |
for (i=0; i<story.length; i++) | |
{ | |
var tsr = story.textStyleRanges; | |
for (j=0; j<tsr.length; j++) | |
{ | |
if (tsr | |
{ | |
if (tsr | |
{ | |
alert(tsr | |
} | |
} | |
} | |
} |
Thanks,
Selva