Article View: adobe.scripting.indesign
Article #433Re: Positioning Inline images? [CS3 JS WIN]
From: Kasyan_Servetsky
Date: Tue, 24 Mar 2009 13:58
Date: Tue, 24 Mar 2009 13:58
25 lines
1465 bytes
1465 bytes
Or, as an option, the script can ask you to choose the folder:
if(app.documents.length != 0){
var myFolder = Folder.selectDialog ('Choose a folder with images');
if(myFolder != null){
// reset the Find/Change dialog
app.findGrepPreferences = app.changeGrepPreferences = null;
// formulate a grep search string
app.findGrepPreferences.findWhat = '@.+?@';
// find all occurrence, last one first
f = app.activeDocument.findGrep (true);
for (i = 0; i < f.length; i++)
{
// construct file name
name = f[i].contents.replace (/@/g, '');
// place the pdf
f[i].insertionPoints[0].place (myFolder.fsName + '/' + name);
}
// delete all @??@ codes
app.activeDocument.changeGrep()
}
}
else{
alert('Please open a document and try again.');
}
Technical Details
Message-ID:
<59b7e7c8.19@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7e7c8.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,af274cf8762a4d09 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Kasyan_Servetsky@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Positioning Inline images? [CS3 JS WIN] Message-ID: <59b7e7c8.19@webcrossing.la2eafNXanI> Date: Tue, 24 Mar 2009 06:58:01 -0700 References: <59b7e7c8.-1@webcrossing.la2eafNXanI> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit