4 Replies Latest reply on Sep 20, 2014 6:48 AM by Laubender

    IDCS6(MAC) 10.9.4 - a script that will make an anchored object and paste in clipboard contents

    Colin Flashman Adobe Community Professional

      I'm trying to create a script that will create an anchored object that will paste in clipboard contents.


      So far I have:


      var frameRef = app.selection[0];

          var parentObj = frameRef.insertionPoints.item(0);

          var anchorFrame = parentObj.rectangles.add();




      And this works fine, creating an inline object, that can further be defined (with anchor point settings etc).


      However, it is when I go to use app.paste() or app.pasteInto() that all hell breaks loose.


      The line of code I added was:


      anchorFrame.content = app.pasteInto();


      and the error I get is:


      Screen Shot 2014-09-20 at 1.57.34 pm.png

      What am I doing incorrectly?