Skip to content

Instantly share code, notes, and snippets.

@florianeckerstorfer
Created August 31, 2012 09:38
Show Gist options
  • Save florianeckerstorfer/3550873 to your computer and use it in GitHub Desktop.
Save florianeckerstorfer/3550873 to your computer and use it in GitHub Desktop.
Opens the current URL from Google Chrome in Safari
(*
Opens the current URL from Google Chrome in Safari
Sources:
- https://discussions.apple.com/message/15728092#15728092
- https://culturedcode.com/things/wiki/index.php/Chrome_to_Things_(AppleScript)
*)
property theURL : ""
tell application "Google Chrome"
set theURL to (get URL of active tab of window 1)
end tell
tell application "Safari"
activate
try
tell window 1 to set current tab to make new tab --with properties {URL:theURL}
set URL of document 1 to theURL
on error
open location theURL
end try
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment