Re: Anchored Picture Box In Quark
Re: Anchored Picture Box In Quark
- Subject: Re: Anchored Picture Box In Quark
- From: Arthur J Knapp <email@hidden>
- Date: Sun, 04 Nov 2001 13:33:12 -0500
>
Date: Sat, 3 Nov 2001 23:57:46 +0100
>
From: Hans Haesler <email@hidden>
>
Subject: Re: Anchored Picture Box In Quark
>
On Sat, 3 Nov 2001, Jay Young wrote:
>
> Anybody have any idea's how to delete an anchored picture box in Quark
>
> using Applescript?
>
property AsciiChars : run script "set charList to {}
>
tell document 1 of application "QuarkXPress 4.11"
>
set aStr to text of selection
>
set numList to {}
>
repeat with i from 1 to count aStr
>
set end of numList to (offset of (character i of aStr) in AsciiChars) - 1
>
end repeat
>
... then you'll see that the anchored box is represented by
>
three characters: {..., 4, 0, 1, ...}.
>
A second box would be... 4, 0, 2. A third... 4, 0, 3 and
>
so on until... 4, 0, 255. Then... 4, 1, 1... 4, 1, 2.
>
To delete an anchored box you must delete all three
>
characters, else you'll get a crash.
>
Now, if you'd like to delete more than one box, then you should
>
rewrite this script to work backwards. But then the problem
>
would be the box which is represented by... 4, 0, 4 ...
Great stuff !!!
Hans, you once posted something about using Quark's character
delimiters to delete or obtain textual elements. Could the same
thing be done to delete all anchored boxes from a text flow?
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.zavatone.com/