I’m trying to place an image in InDesign CS and scale it to fit the frame.
I’m running into a problem once the Image has been placed:
tell myPage
set myImage to make rectangle with properties {geometric bounds:{0.25, 0.25, 12.8, 20.5}}
set myPlacedImage to place placedImage on myImage
set myItem to page item 1
select myItem
So that all works… but then I do:
set theSelection to selection
and it errors. So… how exactly do I select the contents of myImage in order to “fit given content to frame”?
I’ve been looking all day on Adobe’s forums, site, AS sites, etc. and googling the heck out of the web…
tell myPage
set myImage to make rectangle with properties {geometric bounds:{0.25, 0.25, 12.8, 20.5}}
set myPlacedImage to place placedImage on myImage
fit rectangle myImage given proportionally --given content to frame/frame to content/center content/proportionally
ooooh-kaaay. So new problem :rolleyes:
How do I get the properties of the placed image? If I get properties of myImage, I get the properties of the rectangle, correct?
Basically, What I’m doing here is trying to build a very simple auto lay up script, so I need the placed image name and scale passed
to a var so I can dump them to a text box. And no offense, but the scripting indesign guide is somewhat useless to me, probably
because I don’t know applescript too well. Would anyone be willing to put up some tutorial code?
Thanks for pointing out why “rectangle” was erroring.