test_two() and test_three work(), but test_one() does not. Why is that? How do I pass the argument into the handler and use it as a local variable?
set the_application to "Safari"
test_one(the_application)
on test_one(the_application)
tell application the_application
make new document with properties {URL:"http://www.stackoverflow.com"}
end tell
end test_one
# ----
test_two()
on test_two()
tell application "Safari"
make new document with properties {URL:"http://www.stackoverflow.com"}
end tell
end test_two
# ----
set the_application to "Safari"
test_three(the_application)
on test_three(the_application)
tell application the_application
activate
end tell
end test_three
activateis a global command which every application responds to, even if it lacks an AppleScript dictionary.activateis a global command, butmakeis a ...local command? Is there a list of these somewhere? I have not been able to find very good documentation on applescript.tell applicationthat has this problem?