1 Reply Latest reply on Jun 11, 2013 2:18 PM by -hans-

    List used colours

    Frans van der Geest Adobe Community Professional

      I could swear I used to have a script that created a list of used colours in a InDesign document, but it doesn't seem so...

      Is there a way to list all used colours and make a list or something automatically? I have no knowledge of scripting So I am asking here...
      Any help is appreciated!

        • 1. Re: List used colours
          -hans- Level 4

          should save a txt on the desktop which includes used swatches:

           

          #target indesign

           

          app.doScript(mySwatches, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT)

           

          function mySwatches()

          {

              //delete unused swatches

          try{

          app.menuActions.itemByID(16395).invoke();

          app.menuActions.itemByID(16391).invoke();

          }catch (e){}

           

          var cS = app.activeDocument.swatches.everyItem().name.join('\n');

          with(File('~/Desktop/mySwatches.txt'))

          {

          open('W');

          write(cS);

          close()

              }

          }

          //undo the script, eg deleting swatches

          app.activeDocument.undo()