为了偷个懒去查文档,不得不用上AppleScript。。。
不得不说这脚本写完后,用起来是真的舒心
api文档:https://tool.oschina.net/apidocs
on run
tell application "Safari"
reopen
activate
if document = null then
make new document at end of documents with properties {URL:"https://tool.oschina.net/apidocs"}
else
tell window 1
if tab = null then
make new tab at end of tabs with properties {URL:"https://tool.oschina.net/apidocs"}
else
set current tab to (make new tab with properties {URL:"https://tool.oschina.net/apidocs"})
end if
end tell
end if
end tell
end run
有人能讲讲怎么改改那个set current tab啊,这里看着很不舒服,但是不想去查了。。。