View Single Post
The OG applescript library contains a layout command, and shapes have a layer property.

(I don't have a general body of code that I can share for this, unfortunately).