• 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 - search and replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Quark - search and replace


  • Subject: RE: Quark - search and replace
  • From: "Wadson, David" <email@hidden>
  • Date: Wed, 4 Jun 2003 17:17:02 -0400

You'll have to enclose the search/replace in a repeat loop, and cycle
through each item in your lists:

> set searchTextList to ("AAA","BBB")
> set replaceTextList to ("111", "222")
> tell application "QuarkXPress(tm)"
open file filename
end tell
repeat with i from 1 to (count of items in searchText)
set searchText to (item i of searchTextList ) as string
set replaceText to (item i of replaceTextList) as string
tell application "QuarkXPress(tm)"
tell front document
> set (every text of every story where it is searchText) to
> replaceText
> end tell
end repeat

> ----------
> From: Ruby Madraswala
> Sent: Wednesday, June 4, 2003 5:06 PM
> To: Wadson, David
> Subject: RE: Quark - search and replace
>
> David
> Thanks for replying. I tried this:
>
> tell application "QuarkXPress(tm)"
> open file filename
> tell front document
> set searchText to ("AAA","BBB")
> set replaceText to ("111", "222")
> set (every text of every story where it is searchText) to
> replaceText
> end tell
> end tell
>
> I get an error message "Can't set every text of every story of document 2
> whose it = {"AAA","BBB"} to {"111","222"}."
>
> Ruby
>
> -----Original Message-----
> From: Wadson, David [mailto:email@hidden]
> Sent: Wednesday, June 04, 2003 3:54 PM
> To: Ruby Madraswala
> Subject: RE: Quark - search and replace
>
> tell application "QuarkXPress(tm)"
> tell front document
> set (every text of every story where it is searchText) to
> replaceText
> end tell
> end tell
>
>
> > ----------
> > From: Ruby Madraswala
> > Sent: Wednesday, June 4, 2003 3:04 PM
> > To: email@hidden
> > Subject: Quark - search and replace
> >
> > If any one could give me some suggestion or script examples, I want to
> > script quark to do the following:
> >
> > Search a document for a word and replace it with a new word.
> >
> > Tell application "QuarkXpress 4.1)
> > activate
> > Open file filename
> > Tell document 1
> > Set srchlist to (scrh1, srch2,srch3,scrh4........)
> > Set rpllist to (rpl1,rpl2,rpl3,rpl4...........)
> > ?????????
> > End tell
> > End tell
> > if it finds srch3, it will replace with rpl3. I am not sure whether the
> > script can search/place by list or one word at a time.
> >
> > I have checked out Applescripting Quarkxpress by Shirley Hopkins. But I
> > didn't find anything relevant (I must be missing something).
> >
> > Thanks
> > Ruby
> > _______________________________________________
> > applescript-users mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/applescript-users
> > Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: RE: Quark Scripting
  • Next by Date: Re: list question
  • Previous by thread: Quark - search and replace
  • Next by thread: RE: Quark - search and replace
  • Index(es):
    • Date
    • Thread