Copy link to clipboard
Copied
Hi All,
How to read the below highlighted value in script. Pl help me.
Regards,
RockSel
Hi Rock Sel,
Try the below js code.
var myDoc = app.activeDocument.pages.everyItem().textFrames.everyItem();
try{
var myCharlength = myDoc.characters.length;
}catch(e){}
if(myCharlength<=0){
alert("Characters count is 0 in this document!");
}
else{
alert("Characters count : "+myCharlength);
}
thx
csm_phil
Copy link to clipboard
Copied
Your script take some time for long texts (300 pages), but it rocks !
I like the possibility to exclude hidden layers, perfect for exclude some notes in marges, just have to put them on another layer, hide it then count the total.
With your settings, the script can help for several cases.
Does it include tables ? (I think so, but I haven't some to be sure of that)
Thanks a lot,
Anthony
Copy link to clipboard
Copied
@Anthony – yes, it does count characters in tables.
And characters of tables sitting in tables.
The script uses InDesign's GREP search, so this functionality is implicitly built into.
Uwe