• 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-users digest, Vol 3 #1389 - 13 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript-users digest, Vol 3 #1389 - 13 msgs


  • Subject: Re: applescript-users digest, Vol 3 #1389 - 13 msgs
  • From: Scott Lewis <email@hidden>
  • Date: Thu, 27 Feb 2003 14:10:07 -0400

Thanks, Hans. That is exactly what I was looking for.
Scott Lewis
email@hidden

> Hello Scott,
>
> I'm using the following script which fits the image to the box with the
> smallest possible percentage. But it adds about half a percent to be on
> the safe side: the offset values must be negative ones, especially when
> the box has a frame (else, there will be a white hairline for sure):
> ---
> tell document 1 of application "QuarkXPress 4.11"
> activate
> tell current box
> tell image 1
> if bounds is not {0, 0, 0, 0} then
> set bounds to exact fit
> set {yP, xP} to scale as list
> set yP to yP as real
> set xP to xP as real
> if yP > xP then
> set yP to ((yP + 0.5) div 0.1) / 10
> set xP to yP
> else
> set xP to ((xP + 0.5) div 0.1) / 10
> set yP to xP
> end if
> set scale to {yP, xP}
> set bounds to centered
> end if
> end tell
> end tell
> end tell
> ---
> With 'set bounds to centered' the image is centered in the box. No need
> for trying to compute the offset values.
>
> ---
> Hans Haesler <email@hidden>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Printing pdf via applescript
  • Next by Date: Re: do shell script gotcha
  • Previous by thread: Re: Re: ??"Visual Basic environment "can't be initialized"?
  • Next by thread: Photoshop: Get the height/width of a text layer?
  • Index(es):
    • Date
    • Thread