8 Replies Latest reply on Dec 8, 2012 11:22 AM by W_J_T

    Simple InDesign script -> Illustrator help

    alvehyanna

      I have this script by Peter Kahrel that reverese the order of letters in InDesign.

       

      I need an Illustrator version of it. Can anybody help?

       

      ---------------------

      //ReverseText.jsx

      //An InDesign Javascript that reverses the order of any selected text.

      //If no text is selected with the Type tool, nothing happens.

      //Written by Peter Kahrel for InDesignSecrets.com

      //****************

       

      #target indesign

      if ( "TextWordLineParagraph".search ( app.selection[0].constructor.name ) < 0 )

          exit();

      s = app.selection[0].contents;

      s = s.split("").reverse().join("");

      app.selection[0].contents = s;

      -------------------

       

      Mainly using this for Arabic text in CS 3 and 4 for clients that don't have new versions - and will never buy it apparently.

       

      Works great in InDesign. I've been putting the text in ID and then copying it into Illustrator. But it would be nice to skip that step if possible.

       

      Thanks in advance.