Re: search and replace words in quark
Re: search and replace words in quark
- Subject: Re: search and replace words in quark
- From: Shane Stanley <email@hidden>
- Date: Fri, 29 Jun 2001 22:09:02 +1000
On 29/6/01 7:20 PM +1000, Reiner, Stefan, email@hidden,
wrote:
>
I try to search and replaces words in an quark-document. The words contains
>
only one character, because they belongs to a special symbol-font. In this
>
font the character "d" is an other symbol than the character "D". This is
>
the reason, why I have to replace only the lower case "d". With my script in
>
XPress will be both, the lower case "d" and the upper case "D" replaced.
>
I also tried to define by ascii character 100, but also both will be
>
replaced.
There's no easy answer. You will have to do something like get the object
reference of every d/D, and loop through checking the case one at a time.
Something like this:
tell application "QuarkXPress 4.11"
tell document 1
tell (every paragraph of every story whose name of style sheet =
"demo_style")
set theRefs to object reference of every word where it = "d"
set theDs to every word where it = "d"
considering case
repeat with i from 1 to count of theDs
if item i of theDs = "d" then
set font of item i of theRefs to "Times"
end if
end repeat
end considering
end tell
end tell
end tell
--
Shane Stanley, email@hidden