AppleScript to open current Safari page in Google Chrome via LaunchBar or TextExpander

We ran a hint last month about opening the current Safari page in Chrome, but Padraic Renaghan came up with a nice AppleScript that he uses to open the page in Chrome via a LaunchBar action.

property theURL : ""
tell application "Safari"
	set theURL to URL of current tab of window 1
end tell

if appIsRunning("Google Chrome") then
	tell application "Google Chrome"
		if (count of (every window where visible is true)) is greater than 0 then
			-- running with a visible window, ready for new tab
		else
			-- running but no visible window, so create one
			make new window
		end if
	end tell
else
	tell application  ...





Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



via MacOSXHints.com http://feeds.macosxhints.com/click.phdo?i=e6d3d3a3e4bbcb7fa9481f0b7d440259