2 Replies Latest reply on Apr 22, 2009 9:32 AM by René Mølsted

    [CS3 JS] Making sub-/subsub topic (setting parent topic)

    René Mølsted Level 1

      Hi all,

      I'm trying to have my script add an index, that consists of nested topics:

      Parent

      Child

      Sub-child

       

      From what I can read in the Object Model there's a 'withProperties' parameter, but I just can't seem to get it working ...

       

       

      var myDocument = app. activeDocument;

       

      for (var j=0; j<myWord.length; j++){

      if ( j%3 == 0 ) {

       

      var myTopicL1 = myDocument.indexes[0].topics.add(myWord[j]);

      var myTopicL2 = myDocument.indexes[0].topics.add(myWord[j + 1].charAt(0));

       

      var myTopicL3 = myDocument.indexes[0].topics.add(myWord[j + 1]);

      }

      }

       

      --

      molsted