public
anonymous / gist:5575774
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
--
-- open currently active Chrome tab with Safari
-- forked from https://gist.github.com/3151932 and https://gist.github.com/3153606
--
property theURL : ""
tell application "Google Chrome"
set theURL to URL of active tab of window 0
end tell
if appIsRunning("Safari") then
tell application "Safari"
tell front window
open location theURL
end tell
activate
end tell
else
tell application "Safari"
-- Safari not running, so start it
do shell script "open -a \"Safari\""
tell front window
open location theURL
end tell
activate
end tell
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.