Created
November 6, 2011 03:47
-
-
Save pdxmph/1342437 to your computer and use it in GitHub Desktop.
Add a URL from Chrome to Safari's reading list
This file contains 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
#!/usr/bin/env ruby -wKU | |
require "rubygems" | |
require "appscript" | |
include Appscript | |
chrome = app("Google Chrome") | |
safari = app("Safari") | |
chrome_tab = chrome.windows[1].active_tab | |
save_url = chrome_tab.URL.get | |
save_title = chrome_tab.name.get | |
safari.add_reading_list_item(save_url, :with_title => save_title) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tell application "Google Chrome"
set pageUrl to get URL of active tab of first window
end tell
tell application "Safari" to add reading list item pageUrl