我正在尝试运行以下脚本:
on run proUrl
tell application "Safari"
make new document with properties {URL:proUrl}
end tell
end run
这就是我尝试运行它的方式:osascript script.scpt http://google.com
.
我收到以下错误:如果我将变量
script.scpt: execution error: Safari got an error: AppleEvent handler failed. (-10000)
替换为然后它可以工作。proUrl
"http://google.com"
我怎样才能解决这个问题?