Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Image Problem

$
0
0

Hi All,

 

Request:

 

For my script I want to copy all graphics from source document and paste in target document.

 

But for one particular art, the script is quit. That art name not comes in "Link" also (refer screenshot).

 

I dont know what format it is like tiff, eps etc.....

 

 

Please find the screenshot:

 

Screen Shot 2013-04-09 at 3.21.35 PM.png

 

Trying Script(work fine all arts exept above mentioned art):

 

var mySourceDocument = app.documents[0]

var myDocName = mySourceDocument.name

myDocName = myDocName+"";

var ImageSizes = new Array;

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

  var docSource = app.documents.item(myDocName);     // input the proper name

var docDestination = app.documents.item("testing.indd")     // input the proper name

 

var myGraphics = mySourceDocument.allGraphics

for (i = 0; i < myGraphics.length; i++) {

        var myGraphicsName = myGraphics[i].itemLink.name;

            myGeometricBounds = myGraphics[i].parent.geometricBounds

     var myWidth = myGeometricBounds[3] - myGeometricBounds[1]

     var myHeight = myGeometricBounds[2] - myGeometricBounds[0]

 

    if (i == 0) {

        app.activeWindow = docSource.windows.item(0);

        app.select(myGraphics[i].parent);

        app.copy();

        app.activeWindow = docDestination.windows.item(0);

        app.paste();

    }

 

    if (i != 0) {

        app.activeWindow = docSource.windows.item(0);

        app.select(myGraphics[i].parent);

        app.copy();

        app.activeWindow = docDestination.windows.item(0);

        app.paste();

    }

}

 

 

Please find the error screenshot while running the script:

 

Screen Shot 2013-04-09 at 3.55.21 PM.png

 

Could anyone give solution for my problem.

 

 

Thanks

BEGINNER_X


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>