Skip to content

Instantly share code, notes, and snippets.

@wallace
Created May 21, 2014 20:08
Show Gist options
  • Save wallace/daa54e0a66c5cdfb723f to your computer and use it in GitHub Desktop.
Save wallace/daa54e0a66c5cdfb723f to your computer and use it in GitHub Desktop.
delay 1.5
tell application "System Events"
set browser_apps to the name of every process whose visible is true
if "Safari" is in browser_apps then
tell application "Safari"
set hangout to URL of current tab of front window
end tell
else if "Google Chrome" is in browser_apps then
tell application "Google Chrome"
set hangout to URL of active tab of front window
end tell
end if
end tell
set the clipboard to hangout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment