5 Replies Latest reply: Nov 11, 2010 11:37 AM by dcrane37 RSS

    CS3 Ital script help needed

    dcrane37 Community Member

      I'm not familiar with the InCopy Script language and I'm looking for help in how to accomplish the

      following script.

       

      Here's what I would be searching for.

       

      (BEG ITAL) any amount of text here...(END ITAL)

       

      I need the script to remove the (BEG ITAL) and (END ITAL) then change the text between them to italic.

       

      I can do this easily with Word but inCopy scripting stumps me. Any help

      would be appreciated.

       

      Dave

        • 1. Re: CS3 Ital script help needed
          mattaca Community Member

          I'm not sure if you're still looking for help with this, but this can be done with one GREP find/change command. Copy and paste the text between the quotes into the GREP find/change dialog and set up everything else as indicated. I put a space before the expression so you don't end up with double spaces after you find/change, but you may want to watch the first few to make sure it's functioning as you desire.

           

          Find What: " \(BEG ITAL\)(.+?)\(END ITAL\)"

          Change To: leave blank

          Find Format: leave blank

          Change Format: Character style = ITALIC

           

          Let me know if this works for you,

          Matthew

          • 2. Re: CS3 Ital script help needed
            dcrane37 Community Member

            Matthew,

             

            I appreciate your response.

             

            This is close, but it doesn't remove the (BEG ITAL) (END ITAL). I'm trying to not make multiple searches

            user. Anyway with the GREP search to remove these at the same time?

             

            Thanks.

             

            Dave

            • 3. Re: CS3 Ital script help needed
              mattaca Community Member

              Oh, my mistake, Dave. The Change To box should say "$1" (no quotes).

              • 4. Re: CS3 Ital script help needed
                dcrane37 Community Member

                Matthew,

                 

                That works beautifully.

                Thank you.

                 

                Dave Crane

                • 5. Re: CS3 Ital script help needed
                  dcrane37 Community Member

                  Matthew,

                  To make this work I had to wait for another department to create a Italic Character style

                  in our system. they finally did that. Now I can't get the search to work anymore and can't

                  figure out what's wrong. I can break the search down into smaller pieces and it works.

                  I tried \(BEG ITAL\), \(END ITAL\), \(BEG ITAL\)(.+?) and (.+?)\(END ITAL\) and these

                  searches are sucessful. But when I have all the whole string together Incopy tells me

                  it can't find it.

                  Ideas?

                  Dave