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

Re: Quark - Find and Replace -addendum


  • Subject: Re: Quark - Find and Replace -addendum
  • From: Peter Waibel <email@hidden>
  • Date: Tue, 27 Mar 2007 12:03:11 +0200


Am 23.03.2007 um 22:14 schrieb Oakley Masten:

I modified it a bit to test to see if all code numbers
were actually what they were suppose to be.
Following is my rewrite:

property refList : {}
property refList2 : {}

tell application "QuarkXPress"
	tell document 1
		tell text box 50
			tell text 1
				set refList to object reference of every text
whose contents is "#102"
				set refList2 to object reference of every text
whose contents is "#"
				--return refList
				set CountItems to count of items in refList
				set CountItems2 to count of items in refList2
				return CountItems & CountItems2
			end tell
		end tell
	end tell
end tell

This works really well.  Which brings up another
question
How do I get it to test the whole document without
checking each individual box?  I tried but failed to
get the correct syntax for it.

Just get a list of all text boxes then loop thru the boxes list and collect the result in a list:

set resultList to {}
tell application "QuarkXPress"
tell document 1
set textBoxRefList to every text box
repeat with aTextBoxRef in textBoxRefList
tell aTextBoxRef
tell text 1
set aTextRefList to (object reference of every text whose contents is "#102")
set aTextRefList2 to (object reference of every text whose contents is "#")
set CountItems to count of items in aTextRefList
set CountItems2 to count of items in aTextRefList2
set aResult to {CountItems, CountItems2}
set end of resultList to aResult
end tell
end tell
end repeat
end tell
end tell
return resultList


Peter

_______________________________________________
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 -addendum (From: Oakley Masten <email@hidden>)

  • Prev by Date: [ann] PyOSA 0.1.0, Appscript Installer 1.5.1 released
  • Next by Date: Re: Quark List question
  • Previous by thread: Quark - Find and Replace -addendum
  • Next by thread: Costa Bugg is out of the office.
  • Index(es):
    • Date
    • Thread