Question
Open URL in new Safari tab with AppleScript
Is it possible to use AppleScript to open a link in a new tab in Safari?
45 109580
45
Question
Is it possible to use AppleScript to open a link in a new tab in Safari?
Solution
This will work:
tell application "Safari"
tell window 1
set current tab to (make new tab with properties {URL:"http://www.stackoverflow.com"})
end tell
end tell
Solution
I think this also does what you asked for, but it is much shorter and is less browser-specific:
do shell script "open http://www.webpagehere.com"
This will open the specified URL in your default browser. And if you explicitly want to open it in Safari, use this:
do shell script "open -a Safari 'http://www.webpagehere.com'"