Article View: adobe.scripting.indesign
Article #8110PasteInto Problem....
From: mrbounce
Date: Tue, 07 Nov 2006 12:30
Date: Tue, 07 Nov 2006 12:30
27 lines
1525 bytes
1525 bytes
Hi l was going to do this script in applescript but l'm having a go in javascript also.
That l'm trying to do is copy an embeded picture from one document to others that are open.
l've labeled the box 'pic1' on all templates and l'm able to select the picture on the active document and copy to the clipboard by doing something like the following:
//---------
var myActiveSpread = app.layoutWindows[0].activeSpread;
var myTargetSpread = app.documents[0].spreads[0];
var numOfDocs = app.documents.length;
if (numOfDocs > 1) {
for (var n = 0; n < numOfDocs; n++) {
var myTargetSpread = app.documents.item(n);
myImageFrame = myTargetSpread.pageItems.item("pic1").select();
//app.pasteInto();
}
}
//-------
The app.pasteInto will not work unless the TargetSpread is activated (bring to front) so how can l make the back document my active one?
Regards, Gary.
Technical Details
Message-ID:
<3bc23400.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,a6e21d4fb5907625 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: mrbounce@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: PasteInto Problem.... Message-ID: <3bc23400.-1@webcrossing.la2eafNXanI> Date: Tue, 7 Nov 2006 04:30:56 -0800 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit