Anybody got a "Paste in Place" Script?

Hi there,
I have no experience with InDesign Scripts yet, but a couple of tasks on hand that would be faster with Scripts. I only know Actions in Photoshop, so I describing what I need as it would be a Photoshop Action:
- Open all files in folder A (I've got 44 .indd files in this folder)
- Paste in Place on page X (a couple objects I already have in the cache)
- Save
- Close
and so on...
Is this complicated? Can I find this Script somewhere?
I found an "open" and "save" script here, but with my lacking knowledge this won't help me...http://olivier.berquin.free.fr/indesign/indesign_2.html#top_open_document
Thanks so much!
Anke

var myfolder = Folder("/c/...");//or Folder.selectDialog();
var myfiles = myfolder.getFiles("*.indd");
for(i=myfiles.length-1; i>=0; i--)
app.open(myfiles[i]);
app.layoutWindows[0].activePage = myfiles[i].pages[X];
app.pasteInPlace();
app.close(SaveOptions.YES);
//You should better use a place method with a external file rather than pasteInPlace.
Hope it helps.
Loic

Similar Messages

  • Paste in Place across Layers Script

    I'm looking for a script to paste an object (paste in place) on top of all other layers in a file.
    I know I can position a single object on the top layer and then turn the bottom layers on and off, but for my needs (and in this situation) I need to actually paste that object onto each layer.
    Thanks so much for your insight/help!

    Why not simply duplicate the object to every layers?

  • Paste in place to next Master unfunction, can you fix it?

    Hi, everyone
    I got this script, which copy from:
    Paste In Place to Specify Master Page
    I change it into:
    var myDialog = app.dialogs.add({name:"Copy Select item to next Master",canCancel:true});
    with(myDialog){
        with(dialogColumns.add()){
        staticTexts.add({staticLabel:"Select a Master you want to copy to"});
            with(dialogRows.add()){
               var mySelection = dropdowns.add({stringList:["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"], selectedIndex:0});
    if (myDialog.show() == true)
    function main(){
      if("Copy to next Master");
          copy_to_next_master(); 
    function copy_to_next_master() { 
        if (mySelection.selectedIndex == 0){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[0] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  A");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[1] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  B");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[2] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  C");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[3] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  D");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[4] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  E");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[5] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  F");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[6] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master G");
    but unfunction, can you fix it?
    thanks
    Teetan

    Hi,
    Modifying your code - notice that function main() suppose to be
    1. defined and
    2. called
    Compare it to this code:
    #target  indesign
    var
      myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
      mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
    with(myDialog){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Select a Master you want to copy to"});
      with(dialogRows.add()){
      var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
    main();
    function main(){
      if (!app.documents.length || !app.selection.length)
      alert( "Nothing selected!" );
      exit();
      if (myDialog.show() == true)
      copy_to_next_master();
    function copy_to_next_master() {
    var
      mChoice = mySelection.selectedIndex,
      mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
      nSel = app.selection.length,
      mDone = false,
      i,n,nextDoc,curSel;  
    for ( i = 1; i < app.documents.length; i++) {  
      nextDoc = app.documents[i];  
      targetMaster = nextDoc.masterSpreads[mChoice];
      if (!targetMaster.isValid) {
      mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
      continue;
      mDone = true;
      for ( n = 0; n < nSel; n++ ) {
      curSel = app.selection[n];
      curSel.duplicate( nextDoc.masterSpreads[mChoice] );
    mDone ? alert(mMsg) : alert("Nothing copied");
    Jarek

  • How do you "Paste In Place" in javascript?

    I'm seeing a problem when running copy merged and then paste from script.  If there is no alpha component in the mask, it looks like photoshop internally crops the layer to useful content.  Then when you paste, it pastes only the useful content meaning meanin it's translated so pixels at the top and left have content.  This is really stupid default behavior.  However, the UI has a way to work around this, you run Edit | Paste In Place and it keeps the translation component it figured out when running copy merged.  Great.
    Unfortunately since I'm working from script I don't see a way of running Paste In Place as it is not in the commands exposed on Document.  I tried looking at the javascript recording and there appears to be nothing output for that specific command.  Argh!  Does anyone know if photoshop has a way to script this?
    Otherwise, I'm gonna have to look at a completely different way of recording out this stuff.
    Thanks,
    Adrian

    Before copying the merged layer to the clipboard try getting the layers bounds to get size and location.
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS; // tell ps to work with pixels
    var LB = app.activeDocument.activeLayer.bounds;
    app.activeDocument.selection.selectAll()
    app.activeDocument.selection.copy()
    var selectedRegion = Array(Array(LB[0].value,LB[1].value),Array(LB[2].value,LB[1].value),Array(LB[2].value,LB[ 3].value),Array(LB[0].value,LB[3].value));
    app.activeDocument.selection.select(selectedRegion);   //select area to paste into
    app.activeDocument.paste(true);                                          // [paste into] true
    app.preferences.rulerUnits = startRulerUnits;

  • Paste In Place to Specify Master Page

    Hi,
    Can you make a script for  app.pasteInPlace() into master A in all my opening document?
    I want to paste in place an object to all the opening document's "master A" by script, is that possible?
    John White

    Hi Jarek,
    I am a beginner for script, it’s so hard to write this script by my self,
    I found somewhere has this script which made by Laubender:
    var oldPasteRem = app.clipboardPreferences.pasteRemembersLayers; 
    //uncheck “Paste Remembers Layers” 
    app.clipboardPreferences.pasteRemembersLayers = false; 
    for (i = 0; i < app.activeDocument.layers.length; i++) { 
        //Maybe the user does not want objects pasted to invisible layers:  
        if(app.activeDocument.layers[i].visible == true && app.activeDocument.layers[i].locked == false) { 
            app.activeDocument.activeLayer = app.activeDocument.layers[i]; 
            app.pasteInPlace(); 
    //Restore the old condition: 
    app.clipboardPreferences.pasteRemembersLayers = oldPasteRem;
    so can you help me to change it’s function for paste in place on master page?

  • Paste In Place Missing??

    Hey everyone,
    I'm working in Adobe CS3 and I noticed that recently my 'Paste In Place' option under "Edit" is missing...
    Has anybody ever experienced this before?
    Thanks for any help!

    'Show All Menu Items' ... that did the trick!
    Thanks a ton!

  • Nation advanced search on my IMac, which I think is a spyware. When I want wo go to google chrome it redirects me to this ominous nation search engeen. Has anybody got some information about it and how I can get rid of

    I just caught a thing called nation advanced search on my iMac computer, which I think is a spyware. When I want wo go to google chrome it redirects me to this ominous nation search engeen. Has anybody got some information about it and how I can get rid of it? What does can it do to my data and is it really a spyware? I just found information in youtube, that it is a spyware, and that it has to be removed, but the information they give for the removal is just working for PCs not for Macs.
    Please help!

    Thank you all for the friendly assistance provided.
    I have found a solutiton to the problem I was having.  I hope that many more can benefit from the information I will provide.
    I started at Finder, then went to GO selected COMPUTER and then Machintosh HD, then Library, Scripting Additions folder and trashed all that was there. This is what worked for me, if you choose to not delete your content its up to you.  Happy Computing.
    God Bless!!
    This solved my question 

  • Anybody got a better work flow for backing up multiple shoot day projects?

    Many of my projects are shot over multiple days. I import media at the end of each day and back up the event to another drive before deleting media from cameras/cards. So on day 2 I have one of three work flows for updating my back-ups.
    1. If I'm feeling lucky. I delete the previous back-up project from the back-up drive. And then make a new copy of the original event and add the date to the title after the word copy.
    2. I make a new copy of the event to the backup drive and date it. When it's done copying and been verified I delete the back-up event from the same back-up drive.
    3. I've just started copying new clips from the original media folder in the original event to the back-up project. It's more work keeping track of all the newly added media files and there is more chance of making an ommision.
    Anybody got a better work flow for backing up multiple shoot day projects?

    What you need:
    You will need two identical external drives and a copy of Carbon Copy Cloner. CCC is free. The drives could be USB 2 if all you are doing is backing up. If you plan on editing with the drive(s), you'll want firewire. Each needs to be large enough to contain the raw card contents for the duration of your gig.
    The Process:
    At the end of the first day's recording, connect the two drives to your computer (if firewire, daisy chain them / if USB, you'll need two USB 2.0 ports)
    On the first hard drive (Drive 1) create a folder - call it BigDealLecture
    Inside of BigDealLecture, create a folder and use the nameing convention  "BDL_Date_card number for that day" - so if you used 2 cards today, you should create BDL_2012-02-15_01 and BDL_2012-02-15_02
    Attach your card reader or camera to the system.
    Lock the cards so they can not be erased
    Insert Card 1 into the reader
    Select ALL contents of the card and copy them to the folder you created for the first card for today
    When it is complete, eject the card, insert card 2, copy its contents to the folder for card 2
    eject the card
    Launch CCC and do a clone of Drive 1 to Drive 2. You can set it to do a complete block by block clone or an incremental backup. Either will work.
    When finished cloning, test a random sample of the clips on both drives to make sure they work.
    When satisfied the copies work, put Drive 2 in the hotel safe.
    Put the Drive 1 in a place where you can grab it if there is an emergency in the night and erase the cards to get ready for the next day.
    Take Drive 1 with you to the lecture site the next day.
    Rinse and repeat daily.
    When the conference is over, send one of the drives via FedEx or some other same day service to your office. Pack the second drive in your bags for the trip home.
    A note: If you have enough downtime durning the conference between obligations, you can do the transfer from the cards to Drive 1 on site and do the clone when you get back to your room. Don't unlock and erase the cards until you are satisfied the copy/clone process was without incident.
    Have fun.
    x

  • Does Acrobat XI paste-in-place?

    It's been a long standing gripe that when you cut and paste elements from one PDF into another that the precise position is lost. Illustrator and InDesign both support this feature. Has this been addressed in the XI version?

    Can confirm that the Content Editing > "Edit Text & Images" can copy paste to the offset position.
    However this tool does not allow you to select a form element to allow you to copy it.
    The Interactive Object > "Select Object" tool copy pastes to the center of the page.
    So as far as I can see paste in place for form elements is still broken.
    The only way we have got around this is create a text field as big as the page covering everything else.
    select all and copy. then paste. The result is centered then deselect all and then select the big 'placer' field and delete it.
    A cludge of a work around but so far the only way in Acrobat X1 and below. on both Mac and windows.
    Roll on acrobat X2

  • When I try to sync my iPod with iTunes I can't because it says it's over capacity. It's not. It's a 16 GB iPod, it's only 105 songs on there. No movies or pictures or such. Anybody got a word of advise?

    When I try to sync my iPod with iTunes I can't because it says it's over capacity. It's not. It's a 16 GB iPod, it's only 105 songs on there. No movies or pictures or such. Anybody got a word of advise? I've tried resetting the iPod but get the message that it's not possible cause i'm not connected to internet. I am though. Tried managing music manually. I've tried all the usual stuff.

    Go to Settings > General > Usage and see how much is shown available and how much is in "Other".

  • My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    WINDOWS?
    Connect the iPod to your PC. If iTunes starts syncing (ie erasing) your music automatically, hit the X in the upper right hand corner of iTunes display, to the left of the search box, to stop it.
    In Control Panel, Portable Media Devices, double-click your iPod.
    In the Tools menu -> Options, in the View Tab, check "Show hidden files and folders."
    Navigate to the Music folder. On my 'pod, the full path is
    Portable Media Devices\NAME of IPOD (F:)\iPod_Control\Music
    Select all the music folders, and drag and drop them into a folder on your hard drive, or directly into iTunes.
    And you're done! The iPod music folder structure is strange and inexplicable, but once you move your files into iTunes you can set it to automatically organize your folder by artist and album to clean that up. (To do this, in iTunes Edit menu, choose Preferences and in the Advanced tab, check "Keep iTunes Music Folder organized."
    might be out of date worth a try

  • Paste in Place in Photoshop CS6 is not working, am I missing something?

    Hey there,
    I've been using the Creative Suite since CS4, but still count myself as a beginner.
    I'm building a psd file with vectors from an ai file. I recall that in CS5 and CS5.5 I had no issue copying a vector from Illustrator and then using "paste in place" to land it in the same relative spot on the Photoshop canvas. Today, my world has crumbled! Try as I might, I cannot get my vector shapes to "paste in place".
    I am using Windows 7, service pack 1, and CS6 64 bit edition. Both Illustrator and Photoshop were entirely up to date as of today, and I'm in the midst of doing a reinstall, just in case that helps anything. I have already tried dumping the preference file, to no avail.
    Having taken a look through the forums, it seems that Illustrator's clipboard has been handling data differently somehow, and I'm pondering whether this might be the culprit of my issue. However, copying and pasting in place within Illustrator seems to work fine, problems only arise when I copy from Illustrator into Photoshop.
    I feel that I am likely missing something easy to overlook, and I would greatly appreciate some help.
    Message was edited by: sccampbell
    I asked a friend about this issue, and he says that functionality was never there. Is that true? Perhaps it should be, it would be extremely useful. Even though I thought I recalled having done this in the past, I guess I must be mistaken.

    Illustrator has a different origin behavior. There is a global origin and a per artbord origin. you need to fix the problem in AI.
    Mylenium

  • Copy text frames and paste in place from source file to opened docs

    Hello All,
    I have one source indd file which is having 10 small text frames (40pt square) in both pages (Facing pages, Left and Right) on a master page. In that master page there is no frame except that 10 small text frames and the text frame contains the paragraph style called "Cat_Cont".
    I have opened some files and I want to copy that 10 small text frames from the source file and paste in place into the opened InDesign Docs master pages. I hope while copying that text frames, paragraph style also would copy. Could anyone help for this, please?
    If anything not clear plz let me know.
    Thanks in Advance,
    Thiru

    Use TextFrame.duplicate()

  • Is there a Paste in Place option for iBooks Author?

    Is there a paste in place option for iBooks Author like there is in Adobe InDesign? Thanks.

    InDesign's PIP means pasting at arbitrary coordinates.
    Not sure what that has to do with iBA, sorry, which isn't strictly canvas based.
    If you just want to clone items....that depends on the object. Best to experiment with your particular content, etc.
    Ken

  • Paste in Place shortcut not working

    My Paste in Place shortcut (cmd+shift+v) is not working in Adobe Illustrator CC (Updated) for Mac OS X.
    It works when I manually press the command in the edit menu, but not when I use the keystrokes
    When the shortcut is initiated, the software behaves as if nothing was pressed
    It is showing as the proper shortcut when I view my shortcut preferences
    When I try to re-type the shortcut in the preferences, it acts as if nothing was pressed
    I've tried uninstalling SubScribe Plug-in
    I've tried uninstalling Illustrator and then downloading again
    I've tried resetting Illustrator preferences
    I'm using the Apple Wireless Keyboard
    I've tried using another keyboard and that didn't work either
    Please help me, this is affecting workflow

    jwbrobst,
    What about Cmd+V for Paste (centre of the view), Cmd+F (place in front in the same place), or Cmd+B (place in back in the same place)?
    Have you actually selected an object to paste?
    Did you reinstall using the full three step way?
    Uninstall (ticking the box to delete the preferences), run the Cleaner Tool, and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

Maybe you are looking for