• 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 Q&A : Big Thank You Jay ! and the next one...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark Q&A : Big Thank You Jay ! and the next one...


  • Subject: Re: Quark Q&A : Big Thank You Jay ! and the next one...
  • From: Greg Robb <email@hidden>
  • Date: Mon, 25 Nov 2002 23:34:59 -0800

You're right, that's an old reference,
It works for me like this:

tell application "QuarkXPress 4.1"
activate
try
if (current box exists) and ,
(box type of current box is picture box type) and ,
((data size of image 1 of current box) > 0) then
tell front document
set bounds of image 1 of current box to proportional fit
set imageScale to scale of image 1 of current box as list
set imageHeight to item 1 of imageScale as real
set imageWidth to item 2 of imageScale as real
if imageWidth > imageHeight then
set newPercent to item 2 of imageScale --the width
else
set newPercent to item 1 of imageScale -- the height
end if
set scale of image 1 of current box to {newPercent, newPercent}
set offset of image 1 of current box to {0, 0}
end tell
else
display dialog "Oops, didn't see a selected picture box with an image."
end if
on error errText number errNum
if errNum = -128 then
else
beep (display dialog errText)
end if
end try
end tell

I also changed the first error message to cover all trapped properties and
the second to not display that the user canceled.

-Greg Robb
_______________________________________________
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: (Repost) Distributing 'recreatored' script apps...
  • Next by Date: Re: (Repost) Distributing 'recreatored' script apps...
  • Previous by thread: Quark Q&A : Big Thank You Jay ! and the next one...
  • Next by thread: Importing flat files into FMP
  • Index(es):
    • Date
    • Thread