使用 AppleScript 在新的 Safari 选项卡中打开 URL [英] Open URL in new Safari tab with AppleScript

查看:21
本文介绍了使用 AppleScript 在新的 Safari 选项卡中打开 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 AppleScript 在 Safari 的新标签页中打开链接?

Is it possible to use AppleScript to open a link in a new tab in Safari?

推荐答案

这会起作用:

tell application "Safari"
    tell window 1
        set current tab to (make new tab with properties {URL:"http://www.stackoverflow.com"})
    end tell
end tell

这篇关于使用 AppleScript 在新的 Safari 选项卡中打开 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆