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


Click here to return to the 'AppleScript to open a collection of Safari tabs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
AppleScript to open a collection of Safari tabs
Authored by: NaOH-Lye on Apr 18, '11 01:06:04PM
Good to see different approaches like this hint provides. I take a slightly different approach. This script prompts you for the site you'd like to view and then opens the choice in a new tab. For me, this is helpful for the sites I might visit a few times a day.

tell application "System Events"
	activate
	set theList to {"Yahoo", "Weather.com", "Wunderground", "Accuweather", "Weatherbug"}
	choose from list theList with prompt "Choose a page:" default items {"Yahoo"}
	set listchoice to result as text
end tell

if listchoice is "Yahoo" then
	tell application "Safari"
		activate
		tell window 1
			open location "http://www.weather.com/weather/today/College+Park+MD+20740"
		end tell
	end tell
	
else if listchoice is "Weather.com" then
	tell application "Safari"
		activate
		tell window 1
			open location "http://www.weather.com/weather/today/College+Park+MD+20740"
		end tell
	end tell
	
else if listchoice is "Wunderground" then
	tell application "Safari"
		activate
		tell window 1
			open location "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=20742"
		end tell
	end tell
	
else if listchoice is "Accuweather" then
	tell application "Safari"
		activate
		tell window 1
			open location "http://www.accuweather.com/us/md/college-park/20742/city-weather-forecast.asp"
		end tell
	end tell
	
else if listchoice is "Weatherbug" then
	tell application "Safari"
		activate
		tell window 1
			open location "http://weather.weatherbug.com/MD/College%20Park-weather.html?zcode=z6286&zip=20742"
		end tell
	end tell
	
else
	tell application "Safari"
		activate
	end tell
	
end if
end


[ Reply to This | # ]
AppleScript to open a collection of Safari tabs
Authored by: Frederico on Apr 18, '11 02:34:10PM

LOL!

Man, I must be becoming seriously curmudgeonly in my old age, because *this* hint/alternate to my eye is a hypertrophy of a fifth wheel on a hellbox made of deadwood. How many keystrokes or mouse actions do you need to invoke that?

For me, the above is rendered in Safari as Command-T followed by Command-[1-9]. Easy peasy. If I was really so annoyed by two whole keystrokes, again, it can be macroed. Top Sites could be rolled into it for an even prettier transition.

Different strokes... (:

Best

F



[ Reply to This | # ]