2 Replies Latest reply on Jun 23, 2008 3:37 PM by (Gary_Niemeier)

    TextCleanup script in IndyCS2 gives error

      Hi, I'm running IndyCS2 ver. 4.0.5 on Mac OS X 10.4.10. I've loaded the "TextCleanup" script, along with its companion text file, "ASFindChangeList.txt". (have not tampered with either file.) The script starts out normally, but towards the end (20 lines from the bottom) generates an error at the following point:

      set myScript to "tell application \"Adobe InDesign CS2\"" & return & "set properties of find preferences to " & myFindString & return & "end tell" & return
      do script myScript language applescript language

      It says, "doesn't understand the do script."

      Try as I might, I can't understand why it's tripping right there. Thanks in advance for your kind help.
        • 1. Re: TextCleanup script in IndyCS2 gives error
          Level 1
          Hi Gary,

          It sounds as if something is going wrong with the routine that reads the text file. It's most likely that the contents of "myFindString" is not something that InDesign understands. You can add the following line:

          display dialog myFindString

          Just before the line you started with above ("set myScript to..."). When you run the script, it'll display a dialog with the contents of the find string--and I'm betting it's either gibberish or empty.

          Have you tried the JavaScript version? If your interest is simply in getting the thing running, that might be the quickest solution.


          • 2. Re: TextCleanup script in IndyCS2 gives error
            Level 1
            Hi Ole,

            Thanks for your quick response. The JavaScript version ran flawlessly! My find-n-replace workflow in Indy just became a lot less daunting. To borrow shamelessly from McDonald's, I'm loving it.