Article View: adobe.scripting.indesign
Article #14743Re: AppleScript for InDesign CS (Mac OS)
From: Shane_Stanley
Date: Tue, 20 Jan 2004 02:37
Date: Tue, 20 Jan 2004 02:37
42 lines
2106 bytes
2106 bytes
On Jan 20, 2004, at 1:17 PM, Anne Gordon wrote:
> Here is what the script should do:
> � count the number of images in a given folder
set theFolder to (choose folder with prompt "Choose the folder
containing the pic files:")
set theFolderPath to theFolder as Unicode text
set theFileNames to list folder theFolder without invisibles
set picCount to count of items of theFileNames
> � open InDesign
> � open a new document with the same number of pages as are in the
> image folder
tell application "InDesign CS"
make document with properties {document preferences:{pages per
document:picCount, page height:"11 in", page width:"8.5 in", facing
pages:false}}
> � Create a picture box on each page with 1/2" page margin all around
tell document 1
repeat with i from 1 to picCount
tell page picCount
set newFrame to make rectangle with properties {geometric
bounds:{".5 in", ".5 in", "10.5 in", "8 in"}}
> � Import the images in sequence into the picture boxes on each page
set thePic to place (theFolderPath & (item i of theFileNames)) on
newFrame
fit thePic given proportionally
end tell
end repeat
end tell
beep
display dialog "Finished."
end tell
--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<8BF2FC93-4AF1-11D8-B512-003065D61B90@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf75f8.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,d241fb75db1c5450 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-19 18:37:59 PST From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: AppleScript for InDesign CS (Mac OS) Message-ID: <8BF2FC93-4AF1-11D8-B512-003065D61B90@myriad-com.com.au> Date: Mon, 19 Jan 2004 18:37:10 -0800 References: <2ccf75f8.-1@webx.la2eafNXanI> Lines: 43 X-Mailer: Apple Mail (2.609) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit