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

Passing a param to a JavaScript in Java using myApp.doScript

$
0
0
Hi!

I'm trying to pass a very simple string parameter to a JavaScript within my Java code. I am using the example DoRunScript.java that was given in the CS3 SDK:

... (here's a snippet of the code)

//call the javascript, passing in the arguments
VariableType returnValue = myApp.doScript (
VariableTypeUtils.createFile (scriptFilePath),
OptArg.makeScriptLanguageEnum (kScriptLanguageJavascript.value), argSeq);

My question is how do I retrieve the value of the parameter in my Javascript? I gather that I must use something like the following, but I'm not sure what to use as the name.

var myArg = app.scriptArgs.get ("name");

Am I going about this the wrong way? Eventually, I would like to pass an array or an ArrayList. Could I do this?

Thanks for your help!
Jennifer

Viewing all articles
Browse latest Browse all 20709

Trending Articles



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