• 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: Selecting and deleting text in QuarkXPress
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting and deleting text in QuarkXPress


  • Subject: Re: Selecting and deleting text in QuarkXPress
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 21 Jul 2001 17:13:06 +1000

On 20/7/01 8:26 PM +1000, Hans Haesler, email@hidden, wrote:

> 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.

You are right about my snippet, of course. But I think you can get the
correct line count -- or, more usefully, offset of the last character -- if
you ask nicely. Try this:

tell application "QuarkXPress 4.11"
tell document 1
tell text box 1
set theOffsets to offset of character -1 of every line
-- set lineCount to count items of theOffsets
delete text from character ((item -1 of theOffsets) + 2) to character -1
of story 1
if character -1 = return then delete character -1
end tell
end tell
end tell

--
Shane Stanley, email@hidden


References: 
 >Re: Selecting and deleting text in QuarkXPress (From: Hans Haesler <email@hidden>)

  • Prev by Date: Speak text submitted via an email form.
  • Next by Date: Re: upper case
  • Previous by thread: Re: Selecting and deleting text in QuarkXPress
  • Next by thread: Re: Selecting and deleting text in QuarkXPress
  • Index(es):
    • Date
    • Thread