Article View: adobe.scripting.indesign
Article #17571Re: AppleScript: Import tifs one on each page???
From: Richard R�nnb�ck
Date: Thu, 29 May 2003 18:18
Date: Thu, 29 May 2003 18:18
31 lines
2162 bytes
2162 bytes
Ole, of course beat me to it <g> and likewise his script is probably better,
but since I took the time to do it I might as well post it anyway:
tell application "Finder"
set list_of_files to document files of folder (choose folder with prompt "Please select the folder that contains the images you want to place")
end tell
tell application "InDesign 2.0.2"
set myDoc to make document
--set myDoc to active document
set myPageHeight to (page height of document preferences of myDoc)
set myPageWidth to (page width of document preferences of myDoc)
tell myDoc
set ruler origin of view preferences to page origin
repeat with i in list_of_files
tell last page of myDoc
set myRectangle to make rectangle with properties {content type:graphic, geometric bounds:{0.0, 0.0, myPageHeight, myPageWidth}}
tell myRectangle
place i as string
fit given center content
--fit given frame to content
end tell
end tell
if not (count of pages) is equal to (count of list_of_files) then
tell myDoc
make page
end tell
end if
end repeat
end tell
end tell
Technical Details
Message-ID:
<BAFC1B8A.12100%richard.ronnback@telia.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!195.129.110.178.MISMATCH!bnewsoutpeer00.bru.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de950d8.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,b057cd3b108c84c5 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-05-29 11:38:07 PST From: Richard R�nnb�ck <richard.ronnback@telia.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!195.129.110.178.MISMATCH!bnewsoutpeer00.bru.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: AppleScript: Import tifs one on each page??? Message-ID: <BAFC1B8A.12100%richard.ronnback@telia.com> Date: Thu, 29 May 2003 11:18:18 -0700 References: <1de950d8.-1@WebX.la2eafNXanI> Lines: 35 User-Agent: Microsoft-Entourage/10.1.1.2418 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit