2 Replies Latest reply on Mar 8, 2008 1:53 PM by (Mark_Witkowski)

    scriptArgs and Applescript

      Hello,
      I am trying to determine how to pass variables into an InDesign Server Applescript when calling InDesign server via SOAP. I have seen several examples on how to do this with javascript, but nothing with Applescript -- does anyone have ideas or samples on how to accomplish this task?

      I am passing some variables with the scriptArgs parameter in the SOAP call, but what is needed in the Applescript to receive and read the passed variables?

      Thanks,
      Mark
        • 1. Re: scriptArgs and Applescript
          Level 1
          use "tell script args" in conjunction with "get value name "argName""

          Here is an example AppleScript:

          --scriptArgs.applescript
          --An InDesign Server CS3 AppleScript
          --returns the script args passed to the script.

          tell application "InDesignServer"

          tell script args

          set notDefined to "**not_defined**"

          set myArg0 to notDefined
          if is defined name "arg0" then
          set myArg0 to get value name "arg0"
          end if

          set myArg1 to notDefined
          if is defined name "arg1" then
          set myArg1 to get value name "arg1"
          end if
          end tell
          end tell

          set myResult to "arg0: " & myArg0 & ", arg1: " & myArg1

          Susan
          • 2. Re: scriptArgs and Applescript
            Level 1
            Susan,
            Thanks for the reply. I was also able to accomplish this task using the following code:

            tell application "InDesignServer"
            set myArg0 to do script "app.scriptArgs.getValue(\"Arg0\")" language javascript
            end tell

            Mark