Skip to content

Instantly share code, notes, and snippets.

@zoowii
Created May 7, 2014 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoowii/b1818fae22792e4e9bab to your computer and use it in GitHub Desktop.
Save zoowii/b1818fae22792e4e9bab to your computer and use it in GitHub Desktop.
将Chrome中打开的标签页都在Safari浏览器中打开的AppleScript脚本
tell application "Google Chrome"
set cur_win to first window
tell cur_win
set urls to URL of tabs of cur_win
set numOfUrls to (count urls)
-- repeat with i from 1 to (numOfUrls)
repeat with itemUrl in (urls)
-- set itemUrl to (item i of urls)
tell application "Safari" to tell first window to open location itemUrl
end repeat
tell application "Safari" to activate
tell application "Safari" to display dialog "Move tabs from Chrome to Safari successfully"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment