Created
October 29, 2011 05:43
-
-
Save tockrock/1324143 to your computer and use it in GitHub Desktop.
AppleScript that tweets from LaunchBar through ttytter, and notifies with growl(growl notify). Based on work by Justin Blanton(@jblanton) http://hypertext.net/2011/05/tweet-via-launchbar
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
on handle_string(tweet) | |
if length of tweet ≤ 140 then | |
set theResult to do shell script "~/bin/ttytter -status=" & quoted form of tweet & " 2>&1" | |
do shell script "/usr/local/bin/growlnotify -n 'tweet' -m '" & theResult & "' -t 'Success' " | |
else | |
set charsOver to (length of tweet) - 140 | |
do shell script "/usr/local/bin/growlnotify -n 'tweet' -m \"You're " & charsOver & " Chars Over\" -t 'fail'" | |
tell application "LaunchBar" | |
remain active | |
end tell | |
end if | |
end handle_string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment