Article View: adobe.scripting.indesign
Article #16722Re: Script to make a contact sheet?
From: Kelly Vaughn
Date: Tue, 05 Aug 2003 15:29
Date: Tue, 05 Aug 2003 15:29
44 lines
3051 bytes
3051 bytes
Good to know about the date of the book. I'll order it today. Also, here is the exact script I'm working with:
set theHD to (path to startup disk as string)
set theFolder to theHD & "Users:kvaughn:Desktop:JPEGs"
tell application "Finder"
set fileList to name of every file of folder theFolder
end tell
tell application "InDesign 2.0.2"
tell document 1
set theMaster to �class mspr� 1 -- needed when adding pages later
get every �class mpgi� of �class page� -1 -- overrides items from master
-- loop through pics
repeat with i from 1 to (count items in fileList)
set aPic to item i in fileList
-- get name of pic for caption
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set picName to text item -1 of (aPic as text)
set AppleScript's text item delimiters to oldDelims
try -- we try, in case there isn't a frame of the right label
�event K2 plac� aPic given �class insh�:�class crec� (frameCounter as text) of �class page� -1
�event K2 fitc� result given �class givn�:�constant fitoconp�
set contents of �class txtf� (frameCounter as text) of �class page� -1 to picName
on error -- we've run out of frames on the page
set frameCounter to 1 -- reset counter
make �class page� at end with properties {�class pmas�:theMaster} -- add page
get every �class mpgi� of �class page� -1 -- override master items
�event K2 plac� aPic given �class insh�:�class crec� (frameCounter as text) of �class page� -1
�event K2 fitc� result given �class givn�:�constant fitoconp�
set contents of �class txtf� (frameCounter as text) of �class page� -1 to picName
end try
set frameCounter to frameCounter + 1 -- increment counter
end repeat
end tell
end tell
end open
Yeah, I know there's supposed to be tabs in the script, and it's like that in my script editor, but I don't know the HTML code for "display exactly as I've typed it." Sorry...
I hope this helps... by the way, have I mentioned how great you guys are? You all could start a non-profit organization for all the help you've been giving me! :)
Technical Details
Message-ID:
<1dea1a30.25@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1dea1a30.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,9a5ab23a310cf1ec X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-08-05 08:38:06 PST From: "Kelly Vaughn" <kvaughn@activmanuals.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Script to make a contact sheet? Message-ID: <1dea1a30.25@WebX.la2eafNXanI> Date: Tue, 5 Aug 2003 08:29:36 -0700 References: <1dea1a30.-1@WebX.la2eafNXanI> Lines: 48 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit