1 Reply Latest reply on Mar 26, 2014 10:23 AM by erblo007

    Script to index entries in a box


      I'm trying to put together a script that will add new index entries for names in a specific text box.


      In the UI I can use the text tool, then use cmd+option+shift+] to add new index entry (reversed). I want to replicate this action.


      I named the box "IndexNames" in the Layers palette. I want to select the contents and add new index entry (reversed).


      Seems like something like this, but it's a bit of a mess:


      function selectAll(){app.activeDocument.textFrames.itemByName("IndexNames").contents;}


      function apply_Addnewindexentryreversed(){

          var action = app.menuActions.itemByID(78099);

          action.enabled && app.menuActions.itemByID(78099).invoke();



      Thank you!