Article View: adobe.scripting.indesign
Article #16035Re: Q: ID2.02 Page Margin value (VB)
From: gv_verdi
Date: Thu, 23 Oct 2003 05:04
Date: Thu, 23 Oct 2003 05:04
49 lines
2241 bytes
2241 bytes
Hi,
can anybody give me a hint how I can make a new book in Indesign 2.0.2.
The following script from the Indesign Scripting pdf always brings up an error message: "InDesign 2.0.2 got an error: Can't make a book."
Thanks for any hint
G�tz
--Add all of the InDesign files in a folder to
--the book content list of a new book file.
set myFolder to choose folder with prompt "Select the folder containing the book files."
set myFileList to {}
tell application "Finder"
set myFiles to files of myFolder
repeat with myFileCounter from 1 to (count myFiles)
if file type of item myFileCounter of myFiles is "InDd" then
copy (item myFileCounter of myFiles) as string to end of myFileList
end if
end repeat
end tell
if (count myFileList) > 0 then
set myBookFile to choose file name with prompt "Save book file as"
tell application "InDesign 2.0.2"
set myBookPrefs to book preferences
tell myBookPrefs
set mypath to "HD_02:Projekte-Entwicklung:Helektra-Katalog:Inhalt:Buch-Datei:"
set name to "Buch"
end tell
set myBook to make book
--Add the files to the book content list in the reverse of the
--order in which they appear in the folder.
repeat with myFileCounter from (count myFileList) to 1 by -1
tell myBook
make book content with data (item myFileCounter of myFileList)
end tell
end repeat
end tell
else
display dialog "No InDesign files were found in the selected folder."
end if
Technical Details
Message-ID:
<2ccdec1d.4@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccdec1d.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,78496c54819935e8 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-22 22:07:34 PST From: gv_verdi@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Q: ID2.02 Page Margin value (VB) Message-ID: <2ccdec1d.4@webx.la2eafNXanI> Date: Wed, 22 Oct 2003 22:04:38 -0700 References: <2ccdec1d.-1@webx.la2eafNXanI> Lines: 53 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit