• 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:Quark - Picture Box Bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE:Quark - Picture Box Bounds


  • Subject: RE:Quark - Picture Box Bounds
  • From: Eric C Saunders <email@hidden>
  • Date: Fri, 28 Jan 2005 20:44:40 -0500


Mike Milchanowski wrote:

> I'm trying to tell QuarkXPress 6.5 to "Fit Box to Picture" for every picture
> box in my document. I can't seem to find the correct phrase to tell quark
> how to do it.

>Here's what I have so far:

>tell application "QuarkXPress"
>    tell document 1
>       tell every picture box
>           set bounds to box fit
>        end tell
>    end tell
>end tell


I think you need to get the bounds of the picture then calculate the bounds of the box.

this works, not sure if it is the best way.


tell application "QuarkXPress"
       tell document 1
               tell page 1
                       tell picture box 1
                               set a to actual bounds of image 1 as list
                               set b to bounds as list
                               set newxorig to ((item 1 of a) as real) + ((item 2 of b) as real))
                               set newyorig to ((item 2 of a) as real) + ((item 1 of b) as real)
                               set newyterm to ((item 3 of a) as real) + (newyorig)
                               set newxterm to ((item 4 of a) as real) + newxorig
                               set bounds to {newyorig, newxorig, newyterm, newxterm}
                               set offset of image 1 to {"0 pt", "0 pt"}
                       end tell
               end tell
       end tell
end tell


the picture stays where it was on the page, the box "closes in" on it

Cheers,

Eric

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service._______________________________________________________________

This electronic message contains information from MeadWestvaco
Corporation or subsidiary companies, which may be confidential,
privileged or otherwise protected from disclosure. The
information is intended to be used solely by the recipient(s)
named. If you are not an intended recipient, be aware that
any review, disclosure, copying, distribution or use of this
transmission or its contents is prohibited. If you have
received this transmission in error, please notify MeadWestvaco
immediately at email@hidden.
_______________________________________________________________________
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Folder action switching itself off?
  • Next by Date: Re: Quark - Picture Box Bounds
  • Previous by thread: Re: Quark - Picture Box Bounds
  • Next by thread: drop down menu example in applescript
  • Index(es):
    • Date
    • Thread