如何指示 Applescript 打开带有链接的新 Firefox 窗口? [英] How do I instruct Applescript to open a new Firefox window with a link?

查看:22
本文介绍了如何指示 Applescript 打开带有链接的新 Firefox 窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码是这样的

tell application "Firefox"
 open location "http://rubyquicktips.tumblr.com/"
end tell

但如果我打开 Firefox,链接将在新标签页中打开.但我希望链接在新的 Firefox 窗口中打开.我怎样才能做到这一点?

But if I have Firefox open, the link will open in a new tab. But I want the link to open in a new Firefox window. How can I accomplish that?

推荐答案

试试这个...

tell application "Firefox"
    OpenURL "http://rubyquicktips.tumblr.com/"
end tell

或者试试这个...

tell application "Firefox" to activate
tell application "System Events" to keystroke "n" using command down
tell application "Firefox"
    OpenURL "http://rubyquicktips.tumblr.com/"
end tell

这篇关于如何指示 Applescript 打开带有链接的新 Firefox 窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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