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


Click here to return to the 'Make Safari open links from applications in the current space' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make Safari open links from applications in the current space
Authored by: Fivesheep on Nov 05, '09 03:25:41AM
The original version of this script has a bug that it couldn't open the url when safari is not running. below is my version which has it fixed:

on open location theURL
	tell application "System Events"
		try
			if (count of windows of process "Safari") = 0 then
				tell application "Safari" to make new document with properties {URL:theURL}
			else
				tell application "Safari" to open location theURL
			end if
		on error
			tell application "Safari" to set URL of front document to theURL
		end try
		tell application "Safari" to activate
	end tell
end open location
P.S, in order to run this script, you should have "Enable access for assistive devices" enabled on System Preferences->Universal Access

[ Reply to This | # ]