0 Replies Latest reply on Sep 11, 2012 2:37 AM by sshunho

    InDesign CS4 Server Scripting duplicate()




      Just wondering anyone would be able to help me with this.
      I am having problem with using duplicate() in a InDesign CS4 Server Javascript. It locks the InDesign instance while running the script and we have to unlock it by restarting the Server. Below is the offended script. Do anyone have any idea what is causing this? My head hurts...


      var inlines = myDocument.stories.everyItem().pageItems.everyItem().getElements();

      myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;
      myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;
      myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;

      var myPage = myDocument.pages.item(0);
      var myX = myPage.marginPreferences.left;
      var myY = myPage.marginPreferences.top;



      I have tried removed the x and y coordinates and run the script again with only duplicate(); it is still breaking the server. Can anyone help???? Hellllpppppp....