• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quark - Find and Replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Quark - Find and Replace (From: Oakley Masten <email@hidden>)

  • Prev by Date: Quark - Split out individual spread from a doc
  • Next by Date: System Events scripting of Finder window
  • Previous by thread: Quark - Find and Replace
  • Next by thread: Quark - Find and Replace
  • Index(es):
    • Date
    • Thread