2 Replies Latest reply on Apr 27, 2011 4:18 AM by csm_phil

    Move to pasteboard

    Kan7 Level 1

      Hi ,

       

      How to move selected textframe to pasteboard in indesign cs5 using javascript. pls suggest.

        • 1. Re: Move to pasteboard
          csm_phil Level 4

          Hi Kan7,

           

          I have create the script just you check if it is ok for you, I hope you want this.

          Use the Below JS Code:

           

          var myDoc = app.activeDocument;
          myPW = myDoc.documentPreferences.pageWidth;
          var myActivePage = app.layoutWindows[0].activePage;
          if(myActivePage.side == PageSideOptions.leftHand){
              alert("Left page");
              var myBound = (app.selection[0].geometricBounds[1]-app.selection[0].geometricBounds[3]);
              app.selection[0].move([-myPW,0]);
              app.selection[0].move([myBound,0]);

           

              }
          else {
              alert("Right Page");
              app.selection[0].move([myPW,0]);
              }

          alert("Done");

           

          thx

          csm_phil

          • 2. Re: Move to pasteboard
            Kan7 Level 1

            It's fine. Thanks csm_phil.