Language Guide

CHAPTER 4
Commands
102 Command Denitions
EXAMPLE
tell application "Scriptable Text Editor"
get paragraph 3 --gets the value
copy result to item 2 of x --puts the result
end tell
NOTES
The word get in the Get command is optional because AppleScript
automatically gets the value of expressions and references when they
appear in scripts.
For example, the following statements are equivalent:
item 1 of {"Hi,", "how", "are", "you?"}
get item 1 of {"Hi,", "how", "are", "you?"}
The following statements are also equivalent:
tell application "Scriptable Text Editor"
word 1 of document "Introduction"
end tell
tell application "Scriptable Text Editor"
get word 1 of document "Introduction"
end tell
ERROR
Error
number Error message
–1728 Can't get <reference>.