Quark - Find and Replace -addendum
Quark - Find and Replace -addendum
- Subject: Quark - Find and Replace -addendum
- From: Oakley Masten <email@hidden>
- Date: Fri, 23 Mar 2007 14:14:54 -0700 (PDT)
Peter Waibel email@hidden WROTE
Hi Oakley,
maybe this will point you in the right direction:
tell application "QuarkXPress"
tell document 1
tell text box 1
tell text 1
set refList to object reference of every text
whose contents is "x"
return refList
end tell
end tell
end tell
end tell
Peter
PETER THIS WORKS GREAT !
THANKS
------------------------------------------------------
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.
Thanks
Oakley
---------------------------------------------------------
Am 21.03.2007 um 21:20 schrieb Oakley Masten:
> Another Quark Question
>
> I need to verify if a number is correct within a
text
> box.
> The following works great for a single instance.
> Unfortunately, I am now told that the text may
contain
> multiple instances of the number to check.
>
> How would I go about checking the text for more than
a
> single instance without doing a repeat with every
> character routine.
> Is this possible?
>
> -----start
> property theText1 : {}
>
> tell application "QuarkXPress"
> set theText1 to text of current box as text
> set charcount to number of characters in theText1
> end tell
>
> set theOff to offset of "#" in theText1
> set TheECode to (characters (theOff) thru (theOff +
> 3)) of theText1 as text
>
> -------end
>
> thanks for your help
> Oakley
_______________________________________________
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