RE: Working with text selections in Xpress
RE: Working with text selections in Xpress
- Subject: RE: Working with text selections in Xpress
- From: mick wenlock <email@hidden>
- Date: Mon, 12 Nov 2001 16:43:34 -0700
email@hidden
wrote:
Subject: Working with text selections in Xpress
Begin quote:
I struggling to figure out how I can work with a selection of text in Quark
Xpress. There are loads of examples of doing global changes on documents,
text
boxes, stories. What I want is a means of working with a just highlighted
selection of text. E.G. HIghlight an area of text have the script do
something
to the highlighted text. For instance:
Apply a style tag to the text then add a Webding character and a tab to the
front of each highlighted line.
Have an intelligent title maker that looks at each word in the highlighted
text
and capitalizes the initial character in the word ?if it is not a the first
and
is a conjunction (a, and, the)
I can't get over the first hurdle naming working with a selection of text.
TIA, Fred D
end quote
--------------------------------------------
Fred,
If the tex has already been selected - this will give you the wherewithal to
play around :
tell application "QuarkXPress 4.11"
repeat with i from 1 to ((count of characters of selection) - 1)
set thisChar to character i of selection
set ascChar to ASCII number (thisChar)
if (ascChar > 65) and (ascChar < 90) then
set (character i) of selection to ASCII character
(ascChar + 32)
end if
end repeat
end tell
Hope that helps
Mick
Quark Tech Support