Thread View: adobe.scripting.indesign
1 messages
1 total messages
Started by chus
Wed, 11 Feb 2009 09:53
InDesign CS2 Error when yout add a bookContents to a book
Author: chus
Date: Wed, 11 Feb 2009 09:53
Date: Wed, 11 Feb 2009 09:53
30 lines
1648 bytes
1648 bytes
Hi all,
I want create a book in InDesign CS2 and add indesign documents to it using javascript and I get this error //ERROR:Process aborted by user What's wrong with this script?
//DESCRIPTION: Create a book and add indd-files of a choosen folder
var path = "//Users/INDD";
var bookname= "BookINDD";
var myFolder = new Folder(path);
if( myFolder != null ){
// get indd-files of choosen folder
var myFiles=myFolder.getFiles( ficheroIndd );
if ( myFiles.length > 0 ){
var myBookFileName = myFolder + "/"+ bookname + ".indb";
var myBookFile = new File( myBookFileName );
//the book file exists
if(myBookFile.exists){
var myBook=app.open( myBookFile );
myBook.automaticPagination=true;
}else{
//the book file doesn't exist, so make a new one
var myBook=app.books.add( myBookFile );
myBook.automaticPagination=true;
}
//add indd-files to a book
for ( i=0; i < myFiles.length; i++ ){ myBook.bookContents.add( myFiles[i] ); // ERROR:Process aborted by user } myBook.save( ); } }
Thanks,
Chus.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads