Quark - Find and Replace
Quark - Find and Replace
- Subject: Quark - Find and Replace
- From: Oakley Masten <email@hidden>
- Date: Mon, 19 Mar 2007 08:05:01 -0700 (PDT)
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.
Thanks Stan This work great.
Oakley
_______________________________________________
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