Re: Quark - Find and Replace
Re: Quark - Find and Replace
- Subject: Re: Quark - Find and Replace
- From: Stan Cleveland <email@hidden>
- Date: Fri, 16 Mar 2007 10:58:52 -0700
- Thread-topic: Quark - Find and Replace
On 3/16/07 8:34 AM, Oakley Masten wrote:
> How do I script the "Find and Replace" process in
> Quark 6 ?
>
> I need to open a Quark spread and Change the text.
> Example: Find all text in the document that is "#502"
> and replace it with "#503". [the quotes are only to
> define the text to be acted upon.]
The following code will change all occurrences throughout a document.
set findText to "old"
set replaceText to "new"
tell application "QuarkXPress"
tell document 1
try
set every text of stories whose it = findText to replaceText
on error number -10006 -- search string not found
-- handle the error, as desired
end try
end tell
end tell
You can change the 'every text of stories' bit to something like
'every text of story 1 of text box 1 of page 1' to restrict the scope.
Stan C.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden