Answered
Try the following code
function findImage(container) {
while(container.pageItems.length)
container = container.pageItems[0]
if(container)
return container
else
return ""
}
var container, img
for(var i = 0; i < app.documents[0].stories.length; i++) {
var rectCol = app.documents[0].stories[i].rectangles
for(var j = 0; j < rectCol.length; j++) {
container = rectCol[j]
img = findImage(container)
if(img != ""){
app.select(img)
app.cut()
app.select(container)
app.pasteInto()
}
}
}There are many assumptions made but you get the idea. Let me know if this is what you are after or not
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

