How do I instruct Applescript to open a new Firefox window with a link?

后端 未结 4 2137
慢半拍i
慢半拍i 2021-02-20 02:46

my code looks like this

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

but if I have Firefox open, t

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-20 03:33

    try this...

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

    or try this...

    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
    

提交回复
热议问题