• 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: Working with QuarkXPress bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with QuarkXPress bounds


  • Subject: Re: Working with QuarkXPress bounds
  • From: Steve Roy <email@hidden>
  • Date: Thu, 26 Feb 2004 14:24:46 -0500

Hans Haesler <email@hidden> wrote:

> But you'd rather use another approach. The key is to coerce the bounds
> to a list. Then you can get the individual items:
> ---
> tell application "QuarkXPress 4.11"
> set theBoxes to object reference of every picture box of document 1
> repeat with aBox in theBoxes
> set {y1, x1, y2, x2} to bounds of aBox as list
> y1 -->"31.044 mm"
> end repeat
> end tell
> ---
> The result looks like a string. But when you add this line to the script...
> ---
> class of y1
> ---
> .... the result is 'vertical measurement'.
>
> So you need to coerce the value to a real...
> ---
> set y1 to y1 as real
> ---
> .... before you can make any comparison.
>
> Oh yes: I have inserted 'object reference of' to make your snippet work.

Thanks Hans, that's pretty convoluted but it works. (Can't Quark make anything
simple?) However the units I get are in whatever the units are set for the
document, whereas I need to make sure that what I get is in points. How could I
do this?

Steve
--
Steve Roy <email@hidden>
Personal homepage: <http://homepage.mac.com/sroy>
Projects homepage: <http://www.roydesign.net>
_______________________________________________
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.


References: 
 >Re: Working with QuarkXPress bounds (From: Hans Haesler <email@hidden>)

  • Prev by Date: Re: InformationWindow: How do I get info from ...
  • Next by Date: Re: Results differ in editor and applet
  • Previous by thread: Re: Working with QuarkXPress bounds
  • Next by thread: Re: Working with QuarkXPress bounds
  • Index(es):
    • Date
    • Thread