Re: Quark - Find and Replace -addendum
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