Selecting and deleting text in QuarkXPress
Selecting and deleting text in QuarkXPress
- Subject: Selecting and deleting text in QuarkXPress
- From: David Lloyd <email@hidden>
- Date: Fri, 20 Jul 2001 18:13:53 +1000
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?
-----
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?
-----
David Lloyd
---------------------------------
email: email@hidden
web:
http://www.kanzu.com
---------------------------------