This content has been marked as final. Show 5 replies
We should implement a mechanism to get the command line options for InDesign Server. There's some reasons why we didn't but we could probably get around them. They should be documented in the SDK. Let me know if you can't find them.
testclient does not have to run on the same machine. The client and the server can be on different machines. You need to use the -host option in testclient to specify the SOAP port that the server is listening on. If it is on the same machine you would do something like this:
testclient -host localhost:5000 t.js
The -server option to testclient indicates to testclient that the script exists on the server's file system. An the path you specify of the script is a path on the server's file system. If you don't specify -server, then testclient assumes the script is on the client. It then reads the script and sends the script text over the wire, rather than a pathname.
I figured out, accidentally, how to get the command line options.
Just try to start a second instance of indesign without specifying a unique configuration name. When you do this it errors out and gives you the command line options which are:
usage: InDesignServer [ options ]
options: -console -port number -configuration name -iorfile path -pluginpath partialpath -vcusersfile
the easiest way is to read the documentation. It's called "Intro to InDesign CS3 Server.pdf" (serversdk/docs/guides or IDS/documentation/English) and on page 8 you will find the following:
InDesign Server arguments
The InDesign Server command-line arguments enable you to configure various aspects of
InDesign Server. The command line has the following syntax; the options are described in
InDesignServer [ -port number ] [ -configuration name ]
[ -iorfile filepath ] [ -pluginpath folderpath ]
[ -[no]errorlist ] [ -LogToApplicationEventLog ] [ -[no]previews ]
[ -timeout timeoutvalue ] [ -sleep sleepvalue ]
[ -vcusersfile filepath ] [ -console ] [ -help ]
Hello guys! It is possible to get values from command line.
Let's see this example:
testclient -host localhost:6666 myscript.jsx "x=123456"
To access "x" inside myscript.jsx just type:
var my_x = app.scriptArgs.getValue("x");
Good Luck :-)