RE: Case sensitive find/replace
RE: Case sensitive find/replace
- Subject: RE: Case sensitive find/replace
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 25 Jul 2006 10:57:04 -0700
11. Re: Case sensitive find/replace (Jan Bultereys)
> From: Jan Bultereys <email@hidden>
> Subject: Re: Case sensitive find/replace
> To: Stan Cleveland <email@hidden>,
> "email@hidden"
> <email@hidden>
> Message-ID: <C0EBA6EC.5341%email@hidden>
> Content-Type: text/plain; charset="US-ASCII"
>
>>>Thanks to all persons who gave there input...
>>Just a question, how would you implement multiple words, in the script below? I want to replace multiple word with this script.
This is how I would do it, put the script into a handler and call the handler from your script:
--------Script begins-------
change ("Formaat", "Format")
change ("Size", "Groote")
change ("size", "groote")
change ("color", "kleur")
change ("Color", "Kleur")
on change (findText, replaceText)
tell application "QuarkXPress"
tell current box of front document
set i to count words
repeat with x from 1 to i
considering case
if word x is findText then set word x to replaceText
end considering
end repeat
end tell
end tell
end change
-----end of script------
Keep in mind this solution only works if you're replacing single words at a time.
If you're replacing multiple words:
change ("los angeles", "Los Angeles")
Then you may want to use the solution I provided earlier.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden