🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16036

Make book error message

#16036
From: gv_verdi
Date: Thu, 23 Oct 2003 05:09
48 lines
2295 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: <2ccdf229.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,e5b0ab4b546c0b2,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-10-22 22:37:31 PST
From: gv_verdi@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Make book error message
Message-ID: <2ccdf229.-1@webx.la2eafNXanI>
Date: Wed, 22 Oct 2003 22:09:04 -0700
Lines: 52
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit