What have you got, so far?
I have nothing as yet. That is why I am asking for js code.
Please provide if anybody has.
Nothing yet? Okay, here's some pseudocode to get you started.
Let's start straightforward:
for each image and text frame fetch layer if (image AND layer is for text) alert if (text AND layer is for image) alert
Checking each and every item might get a bit slow -- but you might assume you don't make these mistakes very often. So a better algorithm would be this:
for each image frame on text layer if (contains image) alert for each text frame on image layer if (contains text) alert
The extra checks for 'contains image' and 'contains text' are because you might have image or text frames without actual content, using them just as rectangles. So both image and text frames might be empty, and, according to your problem description, that's not an issue.
Thanks for your time. I appreciate it.
Actually, I am beginner in Indesign Scripting. So I need basic JS code for acheive my Task as I mentioned above.
Could anybody has this kind of script code. Please provide me.