3 Replies Latest reply on Jun 19, 2008 11:38 PM by IanDBrown

    [IDS CF8] Can't return a value from the script

      I want to return a value from an indesign server script, but I am getting the error "Variable FOO is undefined". When I run the Coldfusion code (see below), it runs the InDesign Server Script, but I can not get a return value.<br /><br />When I run the script with test client I get: ./testclient test.jsx<br />Script result (std__string): TEST<br /><br />I am using Coldfusion 8 (Win) and IDS is running on OS X 10.5.<br /><br />InDesign Server Script (test.jsx)<br /><br />function main() {<br />     app.consoleout("This is a test");<br />     return "TEST";<br />}<br /><br />main();<br /><br />Coldfusion Code<br /><br /><cfset aRunScriptParameters=StructNew()><br /><cfset aRunScriptParameters.scriptFile = "/Applications/Adobe InDesign CS3 Server/test.jsx" ><br /><cfset aRunScriptParameters.scriptLanguage = "Javascript" ><br /><br /><cfset foo = "" ><br /><cfinvoke webservice="http://127.0.0.1/SOAP/IDSP.wsdl" method="runScript" returnVariable="foo"><br />     <cfinvokeargument name="runScriptParameters" value="#aRunScriptParameters#"/><br />     <cfinvokeargument name="errorNumber" value=""/><br />     <cfinvokeargument name="errorString" value=""/><br />     <cfinvokeargument name="scriptResult" value=""/><br /></cfinvoke><br /><cfoutput>foo</cfoutput><br /><br />Does anyone know of another way of calling InDesign Server from Coldfusion 8 that will get me the return value?<br /><br />Thanks