8 Replies Latest reply on Apr 13, 2011 2:39 AM by stoereee

    [JS IDCS5 Server] app.menuActions.item("Go to Item").invoke();


      I've the following script applies xml attributes values to graphic scale, frame size and offset:


      #include "glue code.jsx";
      function main(){
      var myDoc = app.activeDocument;
      var myRuleSet = new Array (
      new findObjAttribute("//Afbeelding")
      var elements = xmlElements;
      __processRuleSet(elements.item(0), myRuleSet);
      function findObjAttribute(XPATH){
      this.name = "Afbeelding";
      this.xpath = XPATH;
      this.apply = function(myElement, myRuleProcessor)
      try {
      var myXmove=myElement.xmlAttributes.itemByName("yoffset").value;
      var myYmove=myElement.xmlAttributes.itemByName("xoffset").value;
      var myHeight=parseInt(myElement.xmlAttributes.itemByName("height").value);
      var myWidth=parseInt(myElement.xmlAttributes.itemByName("width").value);
      var myScale=parseInt(myElement.xmlAttributes.itemByName("scale").value);
                  try {
                      app.menuActions.item("Go to Item").invoke();
                      app.selection[0].graphics[0].move(undefined, [myYmove, myXmove]);
                      app.selection[0].geometricBounds = [0, 0, myHeight, myWidth];
                      app.selection[0].graphics[0].horizontalScale = myScale;
                      app.selection[0].graphics[0].verticalScale = myScale;
                  app.selection = null;
      return true;


      On InDesign Desktop it is working fine. On InDesign Server it is not working!?


      app.menuActions.item("Go to Item").invoke();


      Is the above line not working on InDesign Server because it has no interface? And how to script it to make it work?


      Regards, Sjoerd