Created
June 17, 2013 03:37
-
-
Save chinghanho/5794508 to your computer and use it in GitHub Desktop.
In Chrome, tweet with selected text which contained the title and the URL of the page from Tweetbot app.
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
on run (input) | |
tell application "Google Chrome" | |
set theURL to URL of active tab of first window | |
set theTitle to title of active tab of first window | |
set theData to theTitle & " " & theURL & " #「" & input & "」" as string | |
end tell | |
activate application "Tweetbot" | |
tell application "System Events" to tell process "Tweetbot" | |
click menu item "New Tweet" of menu 1 of menu bar item "Tweet" of menu bar 1 | |
set value of text area 1 of scroll area 1 of window 1 to (theData as text) | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment