• 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: Fri, 20 Jul 2001 18:48:30 +1000

On 20/7/01 6:13 PM +1000, David Lloyd, email@hidden, wrote:

> I have two questions regarding text in QuarkXPress...
>
> -----
>
> I can select text in a text box in QuarkXPress like so...
>
> "set selection to character 1 of text box 1"
> "set selection to word 1 of text box 1"
> "set selection to paragraph 1 of text box 1"
> "set selection to text style range 1 of text box 1".
>
> But I can't find any method of selecting a range, i.e...
>
> "set selection to paragraphs 1 thru 3 of text box 1".
>
> Can anyone suggest a way of selecting a range of text in QuarkXPress?

tell application "QuarkXPress 4.11"
tell document 1
set selection to text from paragraph 1 to paragraph 3 of story 1 of text
box 1
end tell
end tell

>
> -----
>
> Another problem: I want to delete all text in a box which is overflowed.
>
> Again, I can...
>
> tell text box 1
> copy offset of character -1 of line -1 to theOffset
> set text of characters (theOffset + 1) thru -1 to ""
> end
>
> ...and modified to this makes it faster...
>
> tell text box 1
> copy offset of character -1 of line -1 to theOffset
> copy characters 1 thru theOffset of text 1 as string to theText
> copy (count of paragraphs in theText) to numParas
> set text of paragraphs (numParas + 1) thru -1 to ""
> set text of characters (theOffset + 1) thru -1 to ""
> end
>
> ...but surely there's another easier (and faster) way?

tell application "QuarkXPress 4.11"
tell document 1
tell text box 1
set theOffset to offset of character -1 of line -1
delete text from character theOffset to character -1 of story 1
end tell
end tell
end tell


--
Shane Stanley, email@hidden


References: 
 >Selecting and deleting text in QuarkXPress (From: David Lloyd <email@hidden>)

  • Prev by Date: alert windows
  • Next by Date: Re: Selecting and deleting text in QuarkXPress
  • Previous by thread: Selecting and deleting text in QuarkXPress
  • Next by thread: Re: Selecting and deleting text in QuarkXPress
  • Index(es):
    • Date
    • Thread