Results of Expressions

The result of any expression is its value.You can use the Script Editor to display the result of an expression by typing an expression on a line by itself and running the script. AppleScript returns the value of the expression. Here's an example:

  1. Open the Script Editor if it is not already open.
  2. Type the following expression in the editor subwindow:

  3. 3 + 4
  4. Click the Run button in the Script Editor window.
    This causes AppleScript to evaluate the expression and show the result, 7 , in the result window.
  5. Choose Show Result from the Controls menu.

  6. If the result window is behind another Script Editor window, this will bring it to the front.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)