I'm trying to extract information about images placed into a Pages ('09 v 4.3) document. The following script is my attempt:
tell application "Pages"
tell front document
repeat with pg in pages
tell pg
set im to images
repeat with i in im
tell i
get image data
end tell
end repeat
end tell
end repeat
end tell
end tell
While it doesn't produce errors, and finds every image, it doesn't return any data either and I don't know why it doesn't:
get every image of item 1 of every page of document 1
--> {image 1 of foreground layer of page 1 of document id 14126328}
get image data of image 1 of foreground layer of page 1 of document id 14126328
get every image of item 2 of every page of document 1
--> {image 1 of foreground layer of page 2 of document id 14126328}
get image data of image 1 of foreground layer of page 2 of document id 14126328
get every image of item 4 of every page of document 1
--> {image 1 of foreground layer of page 4 of document id 14126328}
get image data of image 1 of foreground layer of page 4 of document id 14126328
...