RE: QuarkXpress find and replace with variables (new question)
RE: QuarkXpress find and replace with variables (new question)
- Subject: RE: QuarkXpress find and replace with variables (new question)
- From: Aaron Miller <email@hidden>
- Date: Fri, 26 Jan 2001 10:42:10 -0700
>> Shane Stanley <email@hidden> wrote:
>> On 26/1/01 3:43 AM +1000, Aaron Miller, email@hidden,
wrote:
>>
>>> Now
>>> my problem is that it is not replacing according to case
sensitivity.
>>
>> <snip>
>>>
>>> Is there any way to make sure this replaces "One" with "Uno"
instead of
>>> "uno"?
>>
>> Not easily. You'll have to check each instance one at a time.
>>
>> --
>> Shane Stanley, email@hidden
>
>Is there some reason that "considering case" won't work?
>
>considering case
> if "Apple" is "apple" then beep
>end considering
>-- won't beep
>-- p34 of "The Tao of AppleScript" - Derrick Schneider
>
>-Michael
Well, there apparently is a reason, but I don't know what that
reason is. I was unaware of the considering case option, but it didn't work
in QXP. But then, I didn't see "case" as a text property or anything else in
the QXP dictionary. Maybe that indicates that it is fundamentally
impossible. I could set it up to look for a period before the word to
determine case, but that would be sketchy at best.
Also, Shane, what did you mean by checking each instance one at a
time? I don't see how that would change the fact that QXP is ignoring the
case. Here is the script again.
property list1:{"one", "One"}
property list2:{"uno", "Uno"}
on open y
tell application "QuarkXPress(tm)"
activate
open y
tell document 1
tell story 1 of text box 1
repeat with i from 1 to count of list1
set list1item to item i of list1
set list2item to item i of list2
try
considering case --doesn't make a
difference
set (every word where it is
list1item) to list2item
end considering
end try
end repeat
end tell
end tell
end tell
end open
This is the last thing in the way of my script being finished. I really
appreciate the help being offered.
Aaron
Aaron Miller - Macintosh Specialist
Morinda, Inc.
email@hidden
(801) 234-2609