firefoxapplescript

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


My code looks like this

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

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?


Solution

  • 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