• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript / INDD CS3 / importing images and offsetting within frame.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript / INDD CS3 / importing images and offsetting within frame.


  • Subject: Re: AppleScript / INDD CS3 / importing images and offsetting within frame.
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 16 Oct 2008 13:59:50 -0700
  • Thread-topic: AppleScript / INDD CS3 / importing images and offsetting within frame.

On 10/16/08 8:41 AM, "Kevin Muldoon" wrote:

> Need a hand here,
>
> Importing images into an InDesign document and need to move the image within
> the frame. Need something like "set offset of framedImage to {-1.0,1.0}. Code
> snippet appreciated. The AppleScript API of InDesign is very strange compared
> to Quark. Thanks!
>
> set imageFrame to make rectangle at page pg with properties {geometric
> bounds:(obj's frameBounds), stroke color:swatch id swatchIDnone, fill
> color:swatch id swatchIDwhite, item layer:obj's layerID, label:"script label
> name"}
> set framedImage to place (obj's filePath) on imageFrame with properties
> {absolute horizontal scale:(obj's scaleFactor), absolute vertical scale:(obj's
> scaleFactor)}

Look at the "fit" command, which has a number of options:

    fit imageFrame given center content

Or change the image's bounds, since they are independent of the containing
rectangle's bounds:

    set {t, l, b, r} to (obj's frameBounds) -- rectangle's bounds
    set {imgT, imgL, imgB, imgR} to geometric bounds of framedImage
    set {imgW, imgH} to {imgB - imgT, imgR - imgL}
    set geometric bounds of framedImage to {t, l, t + imgH, l + imgW}

HTH,
Stan C.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScript / INDD CS3 / importing images and offsetting within frame.
      • From: Stan Cleveland <email@hidden>
References: 
 >AppleScript / INDD CS3 / importing images and offsetting within frame. (From: Kevin Muldoon <email@hidden>)

  • Prev by Date: Re: Bad Characters
  • Next by Date: Re: AppleScript / INDD CS3 / importing images and offsetting within frame.
  • Previous by thread: AppleScript / INDD CS3 / importing images and offsetting within frame.
  • Next by thread: Re: AppleScript / INDD CS3 / importing images and offsetting within frame.
  • Index(es):
    • Date
    • Thread