Apple script: How to open multiple sites in Safari

If you want Safari to open multiple web sites in tabs at once, copy this in your Apple Script editor and customize it the way you want. Save the script as say “My Sites” and the next time you run it it will open Safari with all the sites at once.

tell application "Safari"
activate
set the URL of document 1 to "http://au.yahoo.com/"
my new_tab()
set the URL of document 1 to "http://forum.macformat.co.uk/index.php"
my new_tab()
set the URL of document 1 to "http://www.satelitskiforum.net/wbb2/index.php"
my new_tab()
set the URL of document 1 to "http://davortech.wordpress.com"
my new_tab()
set the URL of document 1 to "http://au.answers.yahoo.com"

end tell
on new_tab()
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
end new_tab

2 Responses to “Apple script: How to open multiple sites in Safari”

  1. FriedGeek Says:

    Hmmm. I guess I hadn’t noticed if Safari had this. In FireFox I have a folder of bookmarks that I can tell to open all in tabs. I should investigate.

  2. Davor Says:

    Yea, I know Firefox can do that but in Safari ( to my knowledge ) it is not possible. At least not in the current version.

Leave a Reply