Satimage Previous | Next
About AppleScript
Home Documentation Smile Smile Tutorial About AppleScript  
AppleScript

AppleScript is the programming language used in Smile. It is also Apple's inter-application communication language. AppleScript is a component of MacOS X that various software use to control and automate all kinds of tasks.
An AppleScript program is called a script. A script consists in a set of lines of text, the instructions. beep 3 or set r to sqrt(x * x + y * y) are examples of AppleScript instructions.

In Smile, you run scripts in AppleScript terminals. In Smile, AppleScript terminal and text window refer to the same kind of object.
In any AppleScript terminal, select the line(s) of script that you want to run, then press ⌘R or press the 'Enter' key (the key with the ⌅ symbol, or fn↩ on some keyboards). Or, you can run a line after a line: when no text is selected, ⌘R runs the current line. If the script that you run defines a variable or a routine, the variable or routine is then available at any moment in any other AppleScript terminal.

The following chapters provide the minimal information required to use scripts in Smile.

  1. Run a script in an AppleScript terminal
  2. AppleScript variables
  3. Structures: if, repeat, try
  4. Functions
Copyright ©2008 Paris, Satimage