• 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: QuarkXPress: switch anchored image box to text box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuarkXPress: switch anchored image box to text box


  • Subject: Re: QuarkXPress: switch anchored image box to text box
  • From: Hans Haesler <email@hidden>
  • Date: Tue, 24 Apr 2001 22:06:35 +0200

On Tue, 24 Apr 2001, Michael Turner wrote:

>Is there a way to switch an anchored image box to an anchored text box in
>place? (I would be embedding the path of the image in the text.)

Michael,

try this snippet, but, please, make a triple backup of the document, first...
---
tell document 1 of application "QuarkXPress 4.11"
activate
repeat with i from (count of picture boxes) to 1 by -1
set okay to 0
tell picture box i
if (file path of image 1) is not null then
if anchored is true then
tell image 1
set imgPath to (get file path) as text
end tell
set boxRef to object reference
delete image 1
set okay to 1
end if
end if
end tell
if okay = 1 then
set box type of boxRef to text box type
copy imgPath to after paragraph 1 of boxRef
end if
end repeat
end tell
---
... because I've never used this in production. I don't know if a
real-life document will survive this treatment. Normally, you don't change
the type of the box. You store the bounds, create a new box with the
desired box type and delete the old box. But with an anchored box this
would be very tough.

Note that the repeat loop must counts backwards: the number of picture
boxes will be decreasing.

Regards,

Hans

---
Hans Haesler | email@hidden


References: 
 >QuarkXPress: switch anchored image box to text box (From: Michael Turner <email@hidden>)

  • Prev by Date: URL Access latency
  • Next by Date: Re: Non-modal information window showing progress?
  • Previous by thread: QuarkXPress: switch anchored image box to text box
  • Next by thread: Serial port scripting probs
  • Index(es):
    • Date
    • Thread