In a script when cycling through paragraphs, I get a "The property is not applicable in the current state" when trying to
All the other paragraphs are working fine.
I can see the contents of the paragraph, it's baseline and horizontalOffset but not those to properties.
Also the error is not catchable.
I also cannot see to be able to get the endBaseline and endHorizontalOffset for any of the words from that paragraph
The end of the paragraph is probably overset.
Thanks for your answer, you are actually correct, this is the case.
But do you know if there is any way to handle this case?
Try to catch this error without stopping the execution of the script?
How would I know which paragraph on this page is the one that is overflowing?
I see the Story item http://jongware.mit.edu/idcs6js/pc_Story.html
has an overflow property - should I assume the last paragraph is the one with the problem?
you could check the last character of the paragraph. If its parent text
frame is undefined, it's overset. Something like this (myPara could
obviously be any variable)
myPara.characters[-1].parentTextFrames == undefined