1 Reply Latest reply on Dec 7, 2012 4:49 AM by GM*

    FindChangeByList: Error 2741 [CS6][AS]

    GM*

      Hi!

       

      Using FindChangeByList.applescript, I received an "Error 2741" with my recent list. It says:

       

      Expected „„"““ but instead found unknown token.

       

      My list contains just one line, and I am quite sure that I didn’t mess around with the original too much. The search works perfectly in the "Find:GREP" window by the way. Here’s my line:

       

      grep{find what:"(\d\.) (Jan)"}{change to:"$1~S$2"}{include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}Kein Umbruch im Datum

       

      This line will (some day soon I hope) be followed by others, searching for the other beginnings of the months’ names in German.

       

      Anybody with an idea what went wrong? Many thanks in advance!

       

      GM*

        • 1. Re: FindChangeByList: Error 2741 [CS6][AS]
          GM* Level 1

          Okay,  this could be a way to go:

           

          Looks like when you’re using the Applescript version of Adobe’s FindChangeByList script most of the tokens need not one but two backslashes in front in order not to confuse the applescript engine, which uses some (which?) GREP tokens itself with a different meaning. So it’s not \d but \\d in the find-section. Things seem to work even different again in the change-section, I haven’t figured out that by now. Best if you can work with $1 etc.

           

          Great. No word about this on the Adobe Help page and also not in the "support" file that goes with the FindChangeByList.applescript. Seems to be a fantastic way to distinguish newbies and pros.

           

          I (and probably some other dudes trying to get their head around this thing) would appreciate any kind of additional information on this situation, links, whatever, anything. Do we really have to understand the whole Applescript language before we can work with an Adobe script that looks like the only thing you need to know is GREP?

           

          GM*