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?
I'm not entirely familiar with AppleScript, but I was looking to open a brand new default window. Here's a method that works:
tell application "System Events"
tell process "Firefox"
click menu item "New Window" of menu "File" of menu bar 1
end tell
end tell
Optionally, to focus on the new window, add these lines afterward:
tell application "Firefox"
activate
end tell
This will open a default new window. There may be a better way.
this works, but opens your welcome site in first tab...
tell application "Firefox" to activate
tell application "System Events" to keystroke "n" using command down
delay 3
tell application "Firefox"
open location "http://rubyquicktips.tumblr.com/"
end tell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With