-
-
Save rretsiem/4605557 to your computer and use it in GitHub Desktop.
open currently open URL in Safari in Chrome
- modified to use no "do shell" works in Applescript as well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- open currently open URL in Safari in Chrome | |
-- | |
property theURL : "" | |
tell application "Safari" | |
set theURL to URL of current tab of window 1 | |
end tell | |
tell application "Google Chrome" to activate | |
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 | |
tell front window | |
make new tab with properties {URL:theURL} | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment