Create a gist now

Instantly share code, notes, and snippets.

将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