Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Open Safari to multiple tabbed pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open Safari to multiple tabbed pages
Authored by: mr. applescript on Apr 16, '03 10:34:22PM
Good work! Here's a version using a repeat loop iterating a list of URLs:
set the URL_list to {"http://www.apple.com/applescript/
", 
"http://www.apple.com/macosx/", "http://www.apple.com/
itunes/", "http://www.apple.com/iphoto/", "http://
www.apple.com/safari/"}

tell application "Safari"
	activate
	repeat with i from 1 to number of items in URL_list
		set this_URL to item i of URL_list
		my new_tab()
		set the URL of document 1 to this_URL
	end repeat
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


[ # ]