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