Language Guide
CHAPTER 7
Control Statements
186 Tell Statements
AppleScript uses the Microsoft Excel dictionary for definitions of the Copy
command and cell object, and the Scriptable Text Editor dictionary for the
definition of the word object.
tell application "Microsoft Excel"
copy word 5 of document "TestDocument" of application ¬
"Scriptable Text Editor" to Cell "R1C1" of Document ¬
"spreadsheet"
end tell
AppleScript defines two variables, it and me, that you can use in
Tell statements.
The variable it is the default target. The value of it is a reference, as in
tell document "Introduction" of application ¬
"Scriptable Text Editor"
get name of it
end tell
The value of the variable it is document "Introduction" of
application "Scriptable Text Editor". The result of the Get
command is the string "Introduction".
The variable me refers to the current script, as in
property name : "Script"
tell document "Introduction" of application ¬
"Scriptable Text Editor"
get name of me
end tell
--result: "Script"
The reference name of me refers to the name property of the current script.
The result of the Get command is the string "Script".