Article View: adobe.scripting.indesign
Article #2117Re: Swatch to Layer InDCS2...
From: baby1915
Date: Sun, 04 Jan 2009 21:58
Date: Sun, 04 Jan 2009 21:58
14 lines
1181 bytes
1181 bytes
Hi Thiyagu,
I wrote the script for your problemm of Layer Movement see below the script, let you check it out and then tell your suggestions....
var myDoc = app.activeDocument;
try{
myDoc.layers.item("ANNO").name;
}
catch (myError){
myDoc.layers.add({name:"ANNO"});
}
var myAnno = myDoc.layers.item ('ANNO');
var mySwatch = myDoc.swatches.item("IE-Black");
for (i=0; i<myDoc.textFrames.length; i++) { if (myDoc.textFrames[i].paragraphs[0].fillColor == mySwatch ) { myDoc.textFrames[i].itemLayer=myAnno; } }myAnno.visible=false; myDoc.save(); myDoc.close(); alert ("Completed...")
Technical Details
Message-ID:
<59b76a5b.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b76a5b.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,861aec667a920b14 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: baby1915@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Swatch to Layer InDCS2... Message-ID: <59b76a5b.3@webcrossing.la2eafNXanI> Date: Sun, 4 Jan 2009 13:58:02 -0800 References: <59b76a5b.-1@webcrossing.la2eafNXanI> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit