Re: Selecting and deleting text in QuarkXPress
Re: Selecting and deleting text in QuarkXPress
- Subject: Re: Selecting and deleting text in QuarkXPress
- From: Hans Haesler <email@hidden>
- Date: Fri, 20 Jul 2001 12:26:18 +0200
On Fri, 20 Jul 2001, David Lloyd wrote:
>
I have two questions regarding text in QuarkXPress...
Well... they have been answered by Shane, already.
But I have a remark regarding the second solution.
Even the corrected version (theOffset + 2) will fail when the box has
two or more columns, because counting lines in a multiple-columns box
returns a wrong result.
Here is my workaround:
---
tell document 1 of application "QuarkXPress 4.11"
activate
make text box at beginning with properties {bounds:{20, 20, 60, 60}}
set next text box of text box 2 to text box 1
delete text 1 of text box 1
delete text box 1
set lastChar to character -1 of text 1 of text box 1
if (ASCII number of lastChar) is less than 33 then
delete character -1 of text 1 of text box 1
end if
end tell
---
The lastChar business "takes care" of a Return or a 'Next box' character
but spares the last character if the last word is hyphenated...
Okay, you could get the number of columns first. If it is '1' then use
Shane's solution (but insert the test, else the overflow symbol will stay
if the last character is a return).
Regards,
Hans
---
Hans Haesler | email@hidden