Re: considering/ignoring in QuarkXPress
Re: considering/ignoring in QuarkXPress
- Subject: Re: considering/ignoring in QuarkXPress
- From: Shane Stanley <email@hidden>
- Date: Sat, 03 Feb 2001 11:56:19 +1100
On 3/2/01 2:06 AM +1000, Michael Turner, email@hidden, wrote:
>
I ran a test script to test this, and considering/ignoring seems to work as
>
expected. Try this: create a test doc with 2 stories, one with the word
>
"story" the other with the word "STORY" then run this script:
>
>
tell application "QuarkXPress(TM) 4.1"
>
activate
>
tell document 1
>
considering case
>
if the text of story 1 = the text of story 2 then
>
beep
>
return the text of story 2 & " " & the text of story 1
>
else
>
return "no match"
>
end if
>
end considering
>
end tell
>
end tell
>
>
>
The result is "no match".
What's actually happening in your script is that "text of story 1" is being
resolved, then "text of story 2" is being resolved (you can see this in the
log), and the two resulting strings are being compared by AppleScript, not
QuarkXPress.
Type "STORY story" into your first text box and run this:
tell application "QuarkXPress 4.11"
tell document 1
considering case
word 1 of story 1 where it = "story"
end considering
end tell
end tell
The result will be "STORY".
--
Shane Stanley, email@hidden