Article View: adobe.scripting.indesign
Article #16728Re: Script to make a contact sheet?
From: CouponBoy
Date: Tue, 05 Aug 2003 16:10
Date: Tue, 05 Aug 2003 16:10
56 lines
2960 bytes
2960 bytes
THIS IS PART 2 of the script!!
----
repeat with myCounter from 1 to myNumberOfFrames
set myFileName to item myCounter of myFiles as string
set myRectangle to rectangle myCounter of myDocument
tell myRectangle
place myFileName
end tell
--Position/fit the graphic in the frame
try
fit myRectangle given content to frame
fit myRectangle given proportionally
fit myRectangle given center content
end try
--Add the file name to the text frame
tell text frame myCounter of myDocument
tell application "Finder" --remove this Finder tell for full path
set myImagesName to get name of file myFileName as string
end tell
set contents to (myImagesName as string) --change myImagesName to myFileName for full path
set applied paragraph style of paragraph 1 to paragraph style "Label" of myDocument
end tell
end repeat
--make a text box and put the title in it
repeat with W from 1 to myNumberOfPages
tell page W of myDocument
set myBigNameTextBox to make text frame with properties {geometric bounds:{36, 36, 60, 576}, contents:myTitle, fill color:swatch "Black" of myDocument}
end tell
set applied paragraph style of paragraph 1 of myBigNameTextBox to paragraph style "Header" of myDocument
end repeat
--make a text box and put the page number in it
repeat with W from 1 to myNumberOfPages
set vertical justification of text frame preferences of myDocument to bottom
tell page W of myDocument
set myPNBox to make text frame with properties {geometric bounds:{36, 432, 60, 576}, contents:"page " & W & " of " & myNumberOfPages, fill color:swatch "none" of myDocument}
end tell
set applied paragraph style of paragraph 1 of myPNBox to paragraph style "PageNum" of myDocument
end repeat
--Do cleanup, if necessary.
if myRemoveEmptyFrames is true then
tell myDocument
tell (every rectangle whose content type is unassigned) to delete
tell (every text frame whose contents is "") to delete
end tell
end if
--Reset the measurement units
tell document 1
set horizontal measurement units of view preferences to picas
set vertical measurement units of view preferences to picas
end tell
end tell
beep 3
Technical Details
Message-ID:
<1dea1a30.28@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1dea1a30.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,9a5ab23a310cf1ec X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-08-05 09:38:34 PST From: CouponBoy <chris.paveglio@clippermagazine.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Script to make a contact sheet? Message-ID: <1dea1a30.28@WebX.la2eafNXanI> Date: Tue, 5 Aug 2003 09:10:40 -0700 References: <1dea1a30.-1@WebX.la2eafNXanI> Lines: 65 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit