Danke für die schnelle Antwort.
Die scripts haben die Endung *.js
Also, ich habe folgende Datei von Adobe runtergeladen: PDF Multipage Import.js. Habe mich also um das Abspeichern nicht gekümmert.
Auch die adobe sample scripts haben den gleichen Fehler. Werden zwar in der Palette angezeigt, aber mit Stoppzeichen.
Ein Beispiel (wenn auch nicht kurz:
//SelectObjects.js
//An InDesign CS JavaScript
//
//This script selects all objects of a given type or types on the active spread.
//When you choose one of the imported graphic types, the script will select
//the frame containing the graphic (and not the graphic itself).
//
//
//For more on InDesign scripting, go to
http://www.adobe.com/...esign/scripting.html //or visit the InDesign Scripting User to User forum at
http://www.adobeforums.com //
if (app.documents.length != 0){
if (app.activeWindow.activeSpread.pageItems.length != 0){
myDisplayDialog();
}
else {
alert("The active spread does not contain any page items.");
}
}
else{
alert("No documents are open. Please open a document and try again.");
}
function myDisplayDialog(){
var myDialog;
//Create the SelectObjects dialog box.
with(myDialog = app.dialogs.add({name:"SelectObjects"})){
with(dialogColumns.add()){
with(borderPanels.add()){
staticTexts.add({staticLabel:"Select:"});
with(dialogColumns.add()){
var myRectanglesCheckbox = checkboxControls.add({staticLabel:"&Rectangles", checkedState:true});
var myEllipsesCheckbox = checkboxControls.add({staticLabel:"&Ellipses", checkedState:true});
var myPolygonsCheckbox = checkboxControls.add({staticLabel:"&Polygons", checkedState:true});
var myGraphicLinesCheckbox = checkboxControls.add({staticLabel:"&Graphic Lines", checkedState:true});
var myTextFramesCheckbox = checkboxControls.add({staticLabel:"&Text Frames", checkedState:true});
var myGroupsCheckbox = checkboxControls.add({staticLabel:"G&roups", checkedState:true});
var myImagesCheckbox = checkboxControls.add({staticLabel:"&Images", checkedState:true});
var myPDFsCheckbox = checkboxControls.add({staticLabel:"P&DFs", checkedState:true});
var myEPSsCheckbox = checkboxControls.add({staticLabel:"EP&Ss", checkedState:true});
}
}
}
}
myResult = myDialog.show();
if (myResult == true){
var myObjectTypes = new Array;
//Gather control settings from the dialog box and build
//an array containing the object types to select.
if (myRectanglesCheckbox.checkedState == true){
myObjectTypes.push("rectangles");
}
if(myEllipsesCheckbox.checkedState==true){
myObjectTypes.push("ovals");
}
if(myPolygonsCheckbox.checkedState==true){
myObjectTypes.push("polygons");
}
if(myGraphicLinesCheckbox.checkedState==true){
myObjectTypes.push("graphicLines");
}
if(myTextFramesCheckbox.checkedState==true){
myObjectTypes.push("textFrames");
}
if(myGroupsCheckbox.checkedState==true){
myObjectTypes.push("groups");
}
if(myImagesCheckbox.checkedState==true){
myObjectTypes.push("images");
}
if(myPDFsCheckbox.checkedState==true){
myObjectTypes.push("epss");
}
if(myEPSsCheckbox.checkedState==true){
myObjectTypes.push("pdfs");
}
//Remove the dialog from memory.
myDialog.destroy();
mySelectObjects(myObjectTypes);
}
else{
//Remove the dialog from memory.
myDialog.destroy();
}
}
function mySelectObjects(myObjectTypes){
var myObjectsToSelect = new Array;
with(app.activeWindow.activeSpread){
for(myCounter = 0; myCounter < myObjectTypes.length; myCounter++){
if((myObjectTypes[myCounter] != "images")&&(myObjectTypes[myCounter] != "epss")&&(myObjectTypes[myCounter] != "pdfs")){
myPageItems = eval(myObjectTypes[myCounter]);
if (myPageItems.length != 0){
for(myPageItemCounter = 0; myPageItemCounter < myPageItems.length; myPageItemCounter ++){
myObjectsToSelect.push(myPageItems[myPageItemCounter]);
}
}
}
}
for(myCounter = 0; myCounter < pageItems.length; myCounter++){
myPageItem = pageItems.item(myCounter);
try{
if(((myIsInArray("images", myObjectTypes) == true) && (myPageItem.images.length == 1))||
((myIsInArray("epss", myObjectTypes) == true) && (myPageItem.epss.length == 1))||
((myIsInArray("pdfs", myObjectTypes) == true) && (myPageItem.pdfs.length == 1))){
//Is the page item already in the list of items to select?
myID = myPageItem.id;
myItemExists = false;
for(myPageItemCounter = 0; myPageItemCounter < myObjectsToSelect.length; myPageItemCounter++){
if (myObjectsToSelect[myPageItemCounter].id == myID){
myItemExists = true;
break;
}
}
if (myItemExists == false){
myObjectsToSelect.push(myPageItem);
}
}
}
catch(myError){
}
}
parent.select(myObjectsToSelect, false);
}
}
function myIsInArray(myString, myArray){
for (myCounter = 0; myCounter < myArray.length; myCounter ++){
if (myArray[myCounter] == myString){
return true;
break;
}
}
return false;
}