Skip to main content
February 11, 2011
Question

Trouble porting CS3 script to CS5

  • February 11, 2011
  • 1 reply
  • 416 views

Hi:

I'm having difficulty porting some of my CS3 scripts over to CS5. It seems I'm having problems placing graphics in rectangles.

On the following script:

tell application "Adobe InDesign CS5"

activate

set newDoc to make document

tell newDoc

tell document preferences

set page width to 8.5

set page height to 11

end tell

make rectangle with properties {geometric bounds:{1.75, 1.5, 3.5, 4.375}, fill color:swatch "Black", fill tint:0, stroke weight:0.5, stroke color:swatch "Black", stroke tint:0, label:"ImageBox"}

set tempPDF to "Macintosh HD:Users:someuser:Desktop:temp.pdf"

tell rectangle "ImageBox"

place tempPDF

end tell

end tell

end tell

it draws the rectangle but I get an error saying it doesn't understand the "place" message.
Has something changed in how you load a graphic into a rectangle?
Thanks.
--jon

This topic has been closed for replies.

1 reply

February 14, 2011

Hi jon,

Instead of setting the label property, set the name property. Then your script should work.

Thanks,

Ole