• 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: Searching for and replacing text in a Quark Xpress text box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for and replacing text in a Quark Xpress text box


  • Subject: Re: Searching for and replacing text in a Quark Xpress text box
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 10 Oct 2003 08:46:32 +1000

On 10/10/03 2:06 AM +1000, Bis, email@hidden, wrote:

> I have got here a fragment of code here which enables me, in an open
> document, to
>
> 1) search for a text box with a particular stylesheet ("DA Dateline")
> applied to it
> 2) specify the text contained in the box ("26 DECEMBER 2003") and
> 3) replace it with a date of my own choosing ("newDate").
>
> set textBoxes to (object reference of every text box) --get number of
> text boxes
> if the class of textBoxes is not list then ,
> copy (coerce textBoxes to list) to textBoxes
> repeat with thisBox in textBoxes --iterate through each text box
> tell thisBox
> set theStyle to the name of the style sheet of paragraph 1
> if theStyle contains "DA Dateline" then
> find and replace all "26 DECEMBER 2003" by newDate
> --need to find a way of replacing all text in paragraph/box
> --also a way of specifying stylesheet name including ".feature" suffix
> end if
> end tell
> end repeat
> end if
>
>
> What I want to do, however, is to be able to
> 1) search for a text box with a particular stylesheet ("DA Dateline")
> applied to it
> 2) get whatever text it contains
> 3) replace the text it contains with whatever I want to replace it with

You're going about this in an extraordinarily complicated way. Try something
like this:

tell application "QuarkXPress 4.11"
tell document 1
set paragraph 1 of every story whose name of style sheet of paragraph 1 =
"Test" to "Whatever"
end tell
end tell

--
Shane Stanley, email@hidden
_______________________________________________
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.

References: 
 >Searching for and replacing text in a Quark Xpress text box (From: Bis <email@hidden>)

  • Prev by Date: Re: trying to GUI script Filemaker
  • Next by Date: Re: 'Display Dialogs' Photoshop app property
  • Previous by thread: Searching for and replacing text in a Quark Xpress text box
  • Next by thread: Searching for and replacing text in a Quark Xpress text box
  • Index(es):
    • Date
    • Thread