Creating Color swatches?


i've came across script scripting help! batch color swap between libraries.  question is.  how edit make multiple columns per page opposed listing them in 1 column?  works great if make color book.  print roll of swatches.  if insanely complex i'll use one.

 

here's script thats working far..  made ""

 // script trevor make cmyk color swabs http://forums.adobe.com/message/4890389#4890389   var il = app.scriptpreferences.userinteractionlevel;   app.scriptpreferences.userinteractionlevel = userinteractionlevels.never_interact;   app.doscript("main()", scriptlanguage.javascript, undefined, undomodes.entire_script, "make cmyk swabs");   app.scriptpreferences.userinteractionlevel = il;    function main()   {       var swatchdoc, doc, swatchcolors, l, newswatch, newswatchname, cv, ps, m, mtb, tb, ms, tf, ptf;       swatchdoc = app.activedocument;       setupdoc();       app.activedocument = doc;       swatchcolors = swatchdoc.swatches.everyitem().getelements();       l = swatchcolors.length;       while (l--)           {           if (swatchcolors[l].name != "none" && swatchcolors[l].name != "registration" && swatchcolors[l].name != "paper")               {               newswatch = doc.colors.add ({model: swatchcolors[l].model, space: swatchcolors[l].space, colorvalue: swatchcolors[l].colorvalue});               newswatch.space = colorspace.cmyk;               cv = newswatch.colorvalue;               newswatchname = "c="+cv[0]+ " m="+cv[1]+ " y="+cv[2]+ " k="+cv[3];               newswatch.name = (doc.swatches.itembyname(newswatchname).isvalid) ? newswatch.name : newswatchname;               ps.insertionpoints[0].contents = "\r"+swatchcolors[l].name+"\r"+newswatch.name+"\r"               ps.insertionpoints[0].rectangles.add({geometricbounds:[0, 0, "15mm", "45mm"], fillcolor: newswatch.name /*  appliedobjectstyle: mystyle */});               };           }       ps.overflows ? addpages(tf): 0;       function setupdoc()           {               doc = app.documents.add({documentpreferences:{facingpages:0, pageorientation: pageorientation.portrait}});               m = doc.pages[0].marginpreferences;               mtb = doc.pages[0].bounds;               tb = doc.pages[0].bounds;               mtb[0]=mtb[2]-m.bottom;               ms = doc.masterspreads[0].textframes.add ({geometricbounds:mtb, textframepreferences:{verticaljustification:verticaljustification.center_align}});               ms.parentstory.properties = ({digitstype: digitstypeoptions.arabic_digits, hyphenation: 0, justification: justification.center_align, paragraphdirection: paragraphdirectionoptions.left_to_right_direction, contents: specialcharacters.auto_page_number});               tb[0] += m.top; tb[1]+=m.left; tb[2]-=m.bottom; tb[3]-=m.right;               tf = doc.pages[0].textframes.add({geometricbounds:tb})               ps= tf.parentstory;               ps.properties = {digitstype: digitstypeoptions.arabic_digits, hyphenation: 0, justification: justification.left_align, paragraphdirection: paragraphdirectionoptions.left_to_right_direction, rightindent: 2};           }           function addpages(ptf)           {               np = doc.pages.add();               ptf = np.textframes.add({geometricbounds:tb, previoustextframe: ptf});               if (ps.overflows) addpages(ptf);           }   }      

 

thanks

chris

hi chris
,

 

here's video might enjoy

 

to see in full-screen high res can go strait custom swatch book maker on vimeo

a wide range of music there other might want watch too.

 

enjoy.



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Reader DC

AdobeIDの作り方

Adobe InDesign CC 2017 has stopped working