Answered
The script craches when call can't find any instace
Hi all,
Working on a script that looks for anchored groups containing a rectangle name "image"
var t = myDoc.stories.everyItem().groups.everyItem().rectangles.item("image").getElements();
It works great until I test it with a document containing no group or no group with an rectange "image".
In those cases the script crashes on that command.
Same with this other line where I call for a textframe name "title" in a selected group
It works great until I test it with a document containing no group or no group with an rectange "image".
In those cases the script crashes on that command.
Same with this other line where I call for a textframe name "title" in a selected group
app.select(y.textFrames.item("title").getElements(0));
There must be a way to prevent the script from crashing in these cases. Pls help,
Jan
Jan
