Satimage Previous | Next
AppleScript terminals
Home Documentation Smile AppleScript terminals  

An AppleScript terminal is a text window where you can execute AppleScript scripts line-by-line or by blocks.

To make a new AppleScript terminal window, select File ▸ New ▸ New AppleScript terminal ⌘N.

In an AppleScript terminal, ⌘R compiles and executes the current selection (or the current line if the selection is empty), and displays the result in the Console window by default.

This behavior is the key to developing scripts in Smile, since it is how you debug a script piece by piece and how you test each line just written.

For more details about scripting, please consult Using AppleScript in Smile.

Example
Select File ▸ New AppleScript terminal ⌘N. This will open a new (white) window, named untitled. Copy:
set x to time string of (current date)

display dialog "Ran my first script in an AppleScript terminal at " & x & "."
Place the insertion point in the first line, then press ⌘R. The result is displayed in the Console. In your AppleScript terminal, press two more times ⌘R and view the results in the Console.
Now, select the whole text and press ⌘R: this will execute the block as a whole.
Version française
Copyright ©2008 Paris, Satimage