• 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: misleading Quark picture box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: misleading Quark picture box


  • Subject: Re: misleading Quark picture box
  • From: Hans Haesler <email@hidden>
  • Date: Wed, 26 Nov 2003 22:36:23 +0100

On Wed, 26 Nov 2003, Wallace, William wrote ...

<snip>
> if image 1 exists
<snip>
>(...) Is there a way to test reliably if a picture box actually
>contains a picture?


... and Michael Slomski replied:
<snip>
> if file path of image 1 is not null then
<snip>


Hello Bill,

Michael is close (hello Mike :-) but his code doesn't cover pasted PICTs.
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
if bounds of image 1 is not {0, 0, 0, 0} then
if (file path of image 1) is not null then
display dialog "The picture box contains an imported image."
else
display dialog "The picture box contains a pasted PICT."
end if
else
display dialog "The picture box is empty."
end if
end tell
end tell
---

Or:
---
tell document 1 of application "QuarkXPress 4.11"
tell current box
if (file path of image 1) is null then
if bounds of image 1 is {0, 0, 0, 0} then
display dialog "The picture box is empty."
else
display dialog "The picture box contains a pasted PICT."
end if
else
display dialog "The picture box contains an imported image."
end if
end tell
end tell
---

Okay... I've seen _one_ ***empty*** picture box which returned
{32767, 32767, 32767, 32767} and the script thought -- of course --
that it contained an image.

---
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: misleading Quark picture box
      • From: Michael Slomski <email@hidden>
  • Prev by Date: Re: help in scripting Address book
  • Next by Date: set FP brightness
  • Previous by thread: Re: misleading Quark picture box
  • Next by thread: Re: misleading Quark picture box
  • Index(es):
    • Date
    • Thread