2 Replies Latest reply on Jan 20, 2009 1:03 PM by Harbs.

    [JS] [CS3] Create pageItem in the View Centre

    Level 1
      Hi
      I'm building script which adds new item into product catalogue based on the
      code from the prompt() dialog.


      When I run :
      App.activeDocument.rectangles.add()
      The new rectangle is created on the first page of the document.


      app.activeDocument.layoutWindows[0].activePage.rectangles.add()
      is better, but it always places the rectangle on the first page of the
      spread, which is not very helpful for the user who is zoomed into the
      opposite corner of the spread

      app.activeDocument.layoutWindows[0].activePage.rectangles.add().select();
      app.cut();
      app.paste();
      does exactly what I want but is awfully slow, when I deal with complex
      object



      Is there a way to position page items in relation to the screen coordinates?


      Thanks for help

      weller