4 Replies Latest reply on Jun 23, 2014 12:51 AM by Aston Ray

    How to write in response in indesign scripts

    Aston Ray

      I am running this script for getting all form fields of a indd file.

       

       

      var _ALL_FIELDS = "";

       

       

      var allFields = myDocument.formFields;

       

       

      for(var i=0;i

       

       

      var tf = allFields[i];

       

       

      alert(tf.id);

       

       

      alert(tf.label);

       

       

      alert(tf.name);

       

       

      alert(_ALL_FIELDS = _ALL_FIELDS +\",\"+ tf.name);

       

       

      }

       

       

      What i have done is, created a soap-java based client and calling the runscript method. Now i am able to get these fields but how to send these fields back to the client i.e. how to write this in response and then at client side how to read it from response.

       

       

      Code for calling runscript method is:-

       

       

      Service inDesignService = new ServiceLocator();

       

       

      ServicePortType inDesignServer = inDesignService.getService(new URL(parsedArgs.getHost()));

       

       

      IntHolder errorNumber = new IntHolder(0);

       

       

      StringHolder errorString = new StringHolder();

       

       

      DataHolder results = new DataHolder();

       

       

      inDesignServer.runScript(runScriptParams, errorNumber, errorString, results);

       

       

      Also i have found in docs that runScript method returns RunScriptResponse but in my case it's returning void.

       

       

      http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/indesign/sdk/cs6/server/ids-solutio ns.pdf

       

       

      Please help!!!!!!!!!!!!