I have noticed that AppleScript Editor colors “execute” as a command. Also, the following is a valid script (compiles and runs):
script Foo
display dialog "Foo"
end script
on baz()
display dialog "bar"
end baz
execute
execute 3
execute {3, 4, 5}
execute "abc"
execute Foo
execute baz()
The following, however, results in “variable s not defined”:
set s to execute "a"
s
I was not able to find any documentation about “execute”. Is it an AppleScript keyword? If so, what is its purpose?