Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

InDesign CS4 Server Scripting duplicate()

$
0
0

Hi,

 

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;

          if(inlines.length==1){
                 inlines[0].duplicate([myX+37.75,myY+9.5]);  
            }

 

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....

 

Cheers


Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>