@Ralf – are you aware, that you posted your question in the "InDesign Scripting" forum?
If yes and you want to script what Alec is showing in his answer, I give you the following hint:
If you used the Overlay Creator feature "Scrollable Frame" on your rectangle and export that to an IDMS file, you could inspect and extract all the key/value pairs necessary from that file to mimic the Overlay Creator by scripting the key/value pairs.
Thank you, Uwe. This is weird. I read somewhere something about this being done with labels but I was sure that that was a CS5 hack, not the way to do it in CS6!