Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: List used colours

$
0
0

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()


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>