MACSCRPT Archives

April 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dan Feather <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sat, 22 Apr 2006 22:10:49 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
Why won't this script line work w/ QuarkXPress 6.5? It worked fine w/ 4.11.

-- script snip:
tell application "QuarkXPress"
 tell document 1
   set every text of every story where it is varSearch to varReplace
 end tell
end tell
-- 

The error is -10006

If I replace the variable names with actual strings, it works fine. Thinking
the problem had something to do with that, I tried the following:

set {varSearch, varReplace} to {"WWW-", "ASD-"}
set every text of every story where it is varSearch to varReplace

. . . and it worked fine.

I compared (using "log class of..") that command with mine and found
variables were all of class string. (Mine are set by display dialog, so I
use a second line to change Unicode text to string.)

Anyway, it's taking me to the edge!

Many thanks,

Dan
 

ATOM RSS1 RSS2