2 Replies Latest reply on Feb 27, 2008 4:24 AM by (Gerald_Singelmann)

    return-value of do script()

    Level 1
      AppleScript lacks a lot of mathematical (especially trigonometric) functions. So I thought I'd use JavaScript's Math. library. This snippet seems to work:

      tell application "Adobe InDesign CS3"
      set myScript to "a = Math.cos((" & r & "/180)*Math.PI);"
      set res to do script myScript language javascript
      end tell

      But: I found no documentation as to the return value of a do script. It
      b seems
      that the last assigned value in the JS is returned to the AppleScript. But is this really true? Or am I overlooking something obvious?

      Thank you
      Gerald