• 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: Hans Haesler <email@hidden>
  • Date: Thu, 26 Feb 2004 11:14:11 +0100

On Wed, 25 Feb 2004, Steve Roy wrote:

>However I don't know what units those "fixed" values are. What is a fixed
>value, and is this what I want?

Roy,

'as fixed' is supposed to return the rounded and truncated value
you see in the fields of the dialogs and of the palettes. It seems
to work fine with the parameters of the bounds.

An example, where the "real" value is 74.436111450195:
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
set y1 to (top of bounds) as fixed as string as number
end tell
end tell
--> 74.436

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.

---
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.


  • Follow-Ups:
    • Re: Working with QuarkXPress bounds
      • From: Steve Roy <email@hidden>
  • Prev by Date: Re: Working with QuarkXPress bounds
  • Next by Date: Re: Folder Actions & FileMaker backups
  • Previous by thread: Re: Working with QuarkXPress bounds
  • Next by thread: Re: Working with QuarkXPress bounds
  • Index(es):
    • Date
    • Thread