Tob*_*ias 4 safari applescript
如何告诉Safari在当前窗口的新选项卡中打开URL?
这与使用AppleScript的新Safari选项卡中的Open URL重复,但其答案不再适用于当前版本的Safari(5.1 on 10.6.8).选项卡已创建但为空:
tell front window of application "Safari"
make new tab with properties {URL:"http://www.stackoverflow.com"}
end tell
Run Code Online (Sandbox Code Playgroud)
如果您创建一个新的"文档"而不是URL,但这会打开一个窗口.
对于它的价值,我将此报告为Apple的一个错误.但是解决方法会很棒.
我这里没有最新的Safari,但这可能有效
tell front window of application "Safari"
set newTab to make new tab
set the URL of newTab to "http://www.stackoverflow.com"
set the current tab to newTab
end tell
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3832 次 |
| 最近记录: |