Sorry, I don't understand what you mean. Can you explain it a little more?
Search the Adobe InDesign Scripting Forum:
I think, you'll find some working code there.
@Willi – I think the OP wants to find rectangles, that overlap.
But did not tell what to do after finding them. The main problem would be how to make sure not to create a new collision, if you corrected one.