Article View: adobe.scripting.indesign
Article #2046Re: [CS2][JS]Relink images for web and print
From: charles_darwin
Date: Wed, 07 Jan 2009 09:53
Date: Wed, 07 Jan 2009 09:53
13 lines
994 bytes
994 bytes
Hi loic/Martin
This is Kasyan's version:
var myImages = app.activeDocument.allGraphics;
for (i = myImages.length-1; i >= 0 ; i--) {
var myImage = myImages[i].itemLink;
var myNewName = myImage.filePath.replace(/\_web.eps$/i, "_print.eps");
var myNewLink = new File (myNewName);
if (myNewLink.exists) {
myImage.relink (myNewLink);
myImage.update();
}
}
Technical Details
Message-ID:
<59b771d1.8@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b771d1.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,c83165d1b590d57 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: charles_darwin@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [CS2][JS]Relink images for web and print Message-ID: <59b771d1.8@webcrossing.la2eafNXanI> Date: Wed, 7 Jan 2009 01:53:09 -0800 References: <59b771d1.-1@webcrossing.la2eafNXanI> Lines: 14 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit