Script check each page
I'm working on a script to compare the text on a page with the filename of a specific layer. Here's the issue I'm running into:
-
For example, I have a text frame on a layer named Code.
-
The script can find it if it's present on Page 1 or Page 2—that part works fine.
-
However, it doesn't report when the text frame is missing from Page 1 or Page 2.
It seems to handle Parent Pages correctly. For instance, if the Code layer contains the text in the same position on each page via the Parent Page, the script detects it and doesn’t need to take any action.
The problem arises when the text frame is not on parent pages. For example:
-
On Page 1, the text frame is in the top right.
-
On Page 2, it’s in the bottom left.
Then it's detecting text on the layer, so it stops as it's found.
So page 1 might have the text for the code
and page 2 doesn't have text for the code - but the script is not finding it.
Does this make sense?

