🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
2 messages
2 total messages Started by chus Tue, 10 Feb 2009 09:50
InDesign CS2 Error adding bookContents to a book
#1447
Author: chus
Date: Tue, 10 Feb 2009 09:50
23 lines
1681 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 );			

if(myBookFile.exists){//the book file exists
    var myBook=app.open( myBookFile );				
    myBook.automaticPagination=true;
      for ( i=0; i < myFiles.length; i++ ){ myBook.bookContents.add( myFiles[i] ); // ERROR:Process aborted by user } }else{ 	//the book file doesn't exist, so make a new one 	var myBook=app.books.add( myBookFile ); 	myBook.automaticPagination=true; 	for ( i=0; i < myFiles.length; i++ ){ 	 myBook.bookContents.add( myFiles[i] );// ERROR:Process aborted by user 	} } myBook.save( ); } }

Thanks,
Chus.
Re: InDesign CS2 Error adding bookContents to a book
#1449
Author: chus
Date: Tue, 10 Feb 2009 11:49
1 lines
592 bytes
n
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