Tweet = Twitter + Quicksilver

I’m not entirely sure why, but I signed up again for Twitter this morning. Now that it’s not just Tony sending me text messages at 2am about chocolate cake, I can see why people like it. I’ve also been spending some serious time getting geeky with Quicksilver, so I decided to hack together a script to make the two play nicely together.
The upshot? Cmd+Space, period, type your message, tab, tw, enter.
First, The Script
using terms from application "Quicksilver"
on process text tweet
tell application "Keychain Scripting"
set twitter_key to first Internet key of current keychain whose server is "twitter.com"
set twitter_login to quoted form of (account of twitter_key & ":" & password of twitter_key)
end tell
set twitter_status to quoted form of ("source=qucs&status=" & tweet)
set results to do shell script "curl --user " & twitter_login & " --data-binary " & twitter_status & " http://twitter.com/statuses/update.json"
-- display dialog results
return nothing
end process text
end using terms from
Copy this to the clipboard.
Second, Installing It
Paste the script into Script Editor and save it in ~/Library/Application Support/Quicksilver/Actions as Tweet.scpt.
Restart Quicksilver (Cmd+Ctrl+Q).
Third, Configuring It
If you’re not already using Twitterrific, open Keychain Access and add a new password with the following data:
- Keychain Item Name: http://twitter.com
- Account Name: Your email address
- Password: Your Twitter password
If you’re already using Twitterrific, this password will already be in your Keychain. So just sit tight.
Fourth, Using It
Open up Quicksilver (either Ctrl+Space or Cmd+Space), and hit period. Type out your message, and hit tab when you’re done. Type out as much of the word “Tweet” as you need to select the Tweet action. Hit enter. There, it’s sent.
There is no error checking, so if you’ve got the wrong login info, or if Twitter is down, you’ll never know about it. I guess I’m an optimist. Also, it’s Twitter!
Enjoy!
Update: 1/16/07 Added escaping for the status so that special POSIX characters in your tweet don’t freak out the Bash shell.
Update: 1/20/07 Switched over to --data-binary from -F so that messages which started with @ can be posted.
Update: 1/21/07 Just realized that Quicksilver picks up the script as an action if you put it in the Actions folder, making everything way easier and way less complicated. Yay!
Update: 9/2/08 Mike Keen writes in to say:
I have been enjoying your Quicksilver/Twitter script. I contacted twitter and added “Quıcĸsıɩⅴεʀ” as a source, so now when people Tweet using your script, it will say “from Quıcĸsıɩⅴεʀ” on Twitter with a link to your blog post. Just change line 3 to:
set twitter_status to quoted form of ("source=qucs&status=" & tweet)and use the
-dCURL option instead of-FIt works like a charm!
I’ve updated the script with his changes. Thanks, Mike!
January 15th, 2007 at 11:09pm
Coda, i just had some rocky road ice cream.
January 16th, 2007 at 12:56am
Sweet. Thanks.
January 16th, 2007 at 9:37am
Nice lil’ hack. Thanks!
January 16th, 2007 at 12:17pm
Superb! Works a treat.. which is great for me as that Dashboard widget never worked.
January 19th, 2007 at 12:48am
[...] Now, I said something about Twitter earlier… It seems that there is a Quicksilver plugin that already does that directly. Meaning you are posting using twitter API. You can find it here. Share this post on:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]
January 19th, 2007 at 1:05am
[...] I’ve updated Tweet, the Applescript Quicksilver action for Twitter, so that it sends a Growl notification when it completes. The code is here. [...]
January 19th, 2007 at 1:06am
[...] There’s a small ecosystem springing up around Twitter. There are Ruby command line tools (sadly, I couldn’t get them to work because Ruby Gems is messed up on OS 10.4), Python/Growl notifiers (works, but high maintenance), and shiny Mac tools like twitterific. Someone has even written an Applescript Quicksilver action, Tweet, for posting. There are still a few things on my wishlist: 1) for Twitterific to both have it’s little history window and to deliver changes via Growl, and 2) to be able to set my status in Adium, Snak, and Skype based on Tweets. [...]
January 19th, 2007 at 11:36am
Perfect! Great Job.
January 19th, 2007 at 3:25pm
[...] Tweet = Twitter + QuickSilver | Archives | codablog | Coda Hale Sweet! Coda Hale’s glued together two great things, Quicksilver and Twitter. (tags: mac software webdev) [...]
January 19th, 2007 at 11:21pm
[...] First, check out Twitter.com, it’s a little status board. I found a script over on CodaHale.com that lets you update your twitter account from quicksilver. [...]
January 19th, 2007 at 11:28pm
I just added to your great script so it also pushes the change to your iChat Status.
You can see it here.
Thanks for sharing.
January 20th, 2007 at 3:21pm
Most excellent. Thanks!
January 21st, 2007 at 3:08am
Twitter Quicksilver…
…
January 22nd, 2007 at 1:13am
[...] Coda Hale created a Quicksilver action to post conveniently to Twitter. Ted Leung thought it would be nice to have Growl notifications in the mix and Matt Matteson thought it needed a bit more sparkle by adding iChat support. Well, now I add two more options to the mix. [...]
January 27th, 2007 at 1:46am
Just came here over a shared twitter-friend and nearly fell off my chair when I read QS and Twitter in the same post heading. Thanks a bundle. Brightens up my day…
January 30th, 2007 at 11:44am
[...] Specifically, he preferred to use Quicksilver instead, and pointed me to an AppleScript that already gets the Twitter part done. [...]
February 1st, 2007 at 2:27pm
[...] is a neat applescript based on Tweet, that not only gives a Growl notification and changes the iChat status but also adds the current [...]
February 7th, 2007 at 8:38am
Thanks a million for this great little script Coda. I’d like to contribute one to go with it.
I love Quicksilver, but the one problem with using it to update Twitter was that you couldn’t tell if your tweet was too long. Word/letter/line counting is a simple but useful function that I couldn’t find anywhere else in Quicksilver, so I wrote my own AppleScript action for it. Anyone who wants to add such functionality to Quicksilver can get the script from my post on the Quicksilver forums here:
http://blacktree.cocoaforge.com/forums/viewtopic.php?t=5436
I hope people find this useful. Previously I’d echo my tweet through a pipe to wc and run as a shell command. This action is a big improvement on that process :-) Now I simply activate Quicksilver, press period to enter my text, then tab and WC to select my Word Count action, enter, then (assuming it’s not too long) press tab and TW to select the Tweet action and press enter to send my update.
Now Quicksilver provides my favourite way to update Twitter too!
February 8th, 2007 at 5:59pm
[...] a little searching it turns out Coda Hale has already done a perfect job of integrating Twitter and Quicksilver using Applescript. Well done him, but what a git for stealing my [...]
February 11th, 2007 at 3:06am
[...] favourite way though is to use Quicksilver (you can tell I’m a real Quicksilver fan now). The original Applescript was written by Coda Hale. Then Ted Leung modified it and added Growl support so that Quicksilver [...]
February 16th, 2007 at 6:45am
Awesome, thanks!
In preferences you can create a trigger that goes straight to “Command Window in Text Mode” it just takes one step out of that process. :)
February 19th, 2007 at 5:33am
[...] is a quick hack of the Tweet script by Coda Hale. It adds a quick call to the Unix command wc (wordcount) that checks to make [...]
February 28th, 2007 at 4:59am
[...] Twitter and Adium, combine Twitter and Quicksilver (or try this, if your more into Ruby) – oh my, utterly geeky, utterly fun, utterly cool [...]
February 28th, 2007 at 2:13pm
[...] to Twitter can be done through IM, Mobile Phone, Web, Quicksilver and clients. The most popular client I know of (and use) is Twitterific. It’s free from Icon [...]
March 10th, 2007 at 9:58am
Thanks for this script! I changed it to twitter the currently playing iTunes track. Check http://tint.de/twitunes-applescript.
March 11th, 2007 at 8:18pm
Best way to Twitter, period.
March 13th, 2007 at 8:13pm
[...] way to get and send updates. For sending updates, install and use the Applescript+Quicksilver from this page. That allows superfast updates with no client [...]
March 14th, 2007 at 4:21am
[...] Erwähnen für den Mac möchte ich twitteriffic und die Möglichkeit mittels Quicksilver zu Posten. Ich finds recht Praktisch weils einfach nicht so lange dauert wie ein Blog eintrag. Wie ihr [...]
March 17th, 2007 at 2:48am
It’s an awesome script. I like it! But I’m seeing “The variable nothing is not defined” error in the console.
I also didn’t see this variable in your script. How can I fix it?
March 17th, 2007 at 4:42am
[...] use Twitter via Twitteriffic and Tweeter (which is Twitter via Quicksilver). And with every single post I ask myself: Is Twitter nothing [...]
March 18th, 2007 at 2:02am
[...] want more? Well, if you’re on the Mac, you’re in luck. Coda Hale put together a great piece of script that lets you tweet using Quicksilver, and then Ted Leung [...]
March 18th, 2007 at 2:06pm
[...] I just started using Tweet! Which is an amazingly simple way to combine the power of Quicksilver with Twitter. Share and [...]
March 18th, 2007 at 4:41pm
I had one problem with a quick fix: I absolutely had to add an icon to the script (I ended up just throwing the twitteriffic icon) but that would turn this little utility into something that is perfect.
March 18th, 2007 at 5:19pm
[...] File under “neat but useless”: I made an account on Twitter, one of the recent crop of shiny, colorful, user-driven, Mozilla-compatible, feed-readable, whitespace-lovin’ Internet applications — what people like to call Web 2.0. As far as I can tell, Twitter basically a glorified away message service. You can have people’s updates sent to an IM screenname or a cell phone, and you can update your own message remotely through any number of protocols and programs. My favorite is this Quicksilver script. [...]
March 21st, 2007 at 10:08pm
[...] Twitter I immediately went looking for the best way to post to Twitter. Where I found the Tweet = Twitter + Quicksilver which is a great little script, but it never told me when it was successful. (and during twitters [...]
March 21st, 2007 at 11:08pm
[...] client for the Mac called Twitterific, which I have found to be fairly crashorific. Coda Hale put together an AppleScript designed for use with QuickSilver that makes the process of updating Easy And Fun, at least for us [...]
March 22nd, 2007 at 10:21pm
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale Posting to Twitter with Quicksilver: “Cmd+Space, period, type your message, tab, tw, enter.” (tags: quicksilver twitter productivity procrastination) [...]
March 24th, 2007 at 5:17am
[...] support changes the game for this thing. (thanks, Scott Cropper) (tagged: hacks appletv mbwideas) Tweet = Twitter + Quicksilver Send Twitter updates from Quicksilver (via: deli/GreySheepDuo) (tagged: osx quicksilver [...]
March 27th, 2007 at 8:32am
I’m All A Twitter…
There’s a new web application that making all the rounds. It’s getting a lot of hype and some even say it’s “exploded”, meaning it’s the cool app that all the hip kids are using. Well, I’m not one of those kids, but after listening to a bunch of…
March 27th, 2007 at 11:29pm
If anyone is having trouble with the AppleScript timing out when it checks the keychain, there’s a command line way of doing things - I’ve just got this running (and on Panther as well.)
March 30th, 2007 at 12:14am
[...] Tweet = Twitter + Quicksilver — The upshot? Cmd+Space, period, type your message, tab, tw, enter. Tagged as: [twitter quicksilver osx mac applescript] [...]
March 30th, 2007 at 9:31am
[...] Combine Twitter, Quicksilver, and Growl notifications with iChat Filed under: Resources [...]
April 1st, 2007 at 7:51pm
[...] Notes: Twitter Twitterrific Twitterrific Beta TwitterPost Tweet (Install instructions [...]
April 4th, 2007 at 5:11pm
Great addition! Thanks.
April 6th, 2007 at 3:45am
Works great—thanks!
April 6th, 2007 at 5:28pm
[...] first AppleScript I found for the job was here. But as best as I can tell, the Keychain Access was a major bottleneck. Then I found an option that [...]
April 8th, 2007 at 11:52pm
[...] para Twitter, aunque es posible que lo haya. De modo que con un poco de Google he encontrado este post que explica cómo hacerlo de forma [...]
April 10th, 2007 at 8:25am
I modified Ted Leung’s Growlified Tweet (which is based on this script). My version checks message length before sending. Check it out!
April 12th, 2007 at 2:23am
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale Updating twitter from Quicksilver: Cmd+Space, period, type your message, tab, tw, enter (tags: quicksilver twitter hacks apple script) [...]
April 12th, 2007 at 2:31pm
[...] script that operates along with Quicksilver (running Quicksilver is mandatory for Apple users ). Tweet = Twitter + Quicksilver receives text from Quicksilver, obtains your twitter login from the Keychain (if you’re using [...]
April 17th, 2007 at 10:33am
Nice. Im not sure what Twitter is for, but I’m using it, and Quicksilver is the perfect way to interact with it.
April 24th, 2007 at 3:21pm
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale (tags: mac osx software Tweet twitter quicksilver AppleScript) [...]
April 24th, 2007 at 7:23pm
[...] Tweet | Coda Hale decided to hack together a script to make Quicksilver and Twitter play nicely together. [...]
May 14th, 2007 at 3:34am
Nice one. Thanks for that.
May 15th, 2007 at 2:23pm
[...] install it, follow the instructions over at the posting for the original Tweet, but replace the script in step one with [...]
May 17th, 2007 at 1:29am
[...] Tweet = Twitter + Quicksilver [...]
June 28th, 2007 at 12:39pm
Haha nice Lock Stock reference in the chat… Chill, Winston!
July 6th, 2007 at 2:18pm
Update for Pownce & Twitter at the same time?
July 23rd, 2007 at 1:59am
[...] Twitter, Quicksilver and Adium aspects are based on this little script as well as this one. Finally, the Skype part is easy to add once you understand their API a [...]
July 24th, 2007 at 8:52pm
I had to change:
set twitter_key to first Internet key of current keychain whose server is "twitter.com"to
set twitter_key to first generic key of current keychain whose name is "Twitterrific"in order to get it to work, because my twitter key is just a regular aplication password.
August 3rd, 2007 at 9:33am
[...] pour ceux qui ont pas de vie, mais un mac et envie de twitter plus vite que leur ombre, il y Tweet, un petit AppleScript à installer pour pouvoir twitter en 3 secondes à travers [...]
August 20th, 2007 at 4:05am
Add the code below to the script if you want Growl support. Have fun :)
using terms from application "GrowlHelperApp"
-- Register Growl
on growlRegister()
tell application "GrowlHelperApp"
register as application "Tweet" all notifications {"Alert"} default notifications {"Alert"} icon of application "Twitterrific.app"
end tell
end growlRegister
-- Notify using Growl
-- Example: growlNotify("This is an Alert","This is a test of the Growl Alert System")
on growlNotify(grrTitle, grrDescription)
tell application "GrowlHelperApp"
notify with name "Alert" title grrTitle description grrDescription application name "Tweet"
end tell
end growlNotify
end using terms from
August 31st, 2007 at 9:47am
This is sweet. Thank you.
September 2nd, 2007 at 9:52pm
[...] the Script Download the script from Baron VC or copy and paste it from the blog of its originator, codahale. Put the script into the ~LibraryApplication SupportQuicksilverActions folder. If the folder [...]
September 3rd, 2007 at 9:59am
[...] these instructions for adding a Tweet action to Quicksilver, but use this script [...]
September 25th, 2007 at 3:58pm
Thanks for this, Coda! You rock!
Thanks also to Michael Janssen whose (who’s?) script tweak made this work for me. My day just got a bit brighter!
October 9th, 2007 at 9:19am
Very cool! Thank you.
October 9th, 2007 at 11:37am
[...] has already built something for this. A quick Google search yielded a great script for Quicksilver here and the improved version with iChat support here. [...]
October 12th, 2007 at 8:33am
[...] Tweet: Twitter + QuickSilver. Para os Die Hard fans do QS esta solução pode ser o que faltava para aderirem ao Twitter. [...]
October 26th, 2007 at 3:35pm
Thank you thank you thank you.
And to Michael Janssen too. Yay!
November 22nd, 2007 at 10:37am
[...] Stuff Monday + Stick Em Up + Quicksilver tutorial for Google Calendar + Quicksilver tutorial for Twitter + Google Gas Gadget + Expensr + PodCamp Europe Gift [...]
November 29th, 2007 at 4:21am
[...] and are driven to tell everyone what you’re doing as you you’re doing it, check out Tweet, a twitter plugin for Quicksilver. Installation’s a little more complicated than for most [...]
November 29th, 2007 at 6:14pm
[...] love Twitter. Now that Twitterriffic is adware, Coda Hale’s Tweet action for Quicksilver is undoubtedly the slickest way to post updates to Twitter. It will accept text input directly from [...]
December 21st, 2007 at 2:13pm
[...] been sending my thoughts to Remember The Milk with Quicksilver via Twitter with the help of Tweet until now, but that was fairly basic and seemed like an overly-convoluted path for the information [...]
December 24th, 2007 at 10:40am
Works perfectly. Thanks!
CP
January 3rd, 2008 at 7:20am
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale Post to twitter from Quicksilver with this simple 3 step setup. (tags: applescript quicksilver twitter) [...]
January 6th, 2008 at 4:46pm
[...] devices supporting twitter. I have Twitterrific to read messages, and can easily send them through Quicksilver. My tweets are displayed on the right of my blog using a simple wordpress [...]
January 12th, 2008 at 10:25am
[...] kan óg bli brukt til alt mogeleg anna rart, frå å kontrollere Twitter, til å bli mint på å sjekke omnen om ti [...]
January 22nd, 2008 at 1:12pm
[...] using terms from It is from here. Now this is fairly simple to [...]
January 31st, 2008 at 5:42am
I like this cuttie goodie!!
February 15th, 2008 at 6:34pm
[...] It’s all nicely described here. [...]
April 2nd, 2008 at 12:46am
Thanks for the script. Just a note, you may want to encode the tweet string. Things like an ampersand break up the tweet and cut it off at the &. Use something like this http://bbs.macscripter.net/viewtopic.php?id=11380
April 8th, 2008 at 4:45pm
Works great. But what if you have multiple Twitter accounts on your Keychain? It will pick the first one alphabetically. Is there a workaround for that?
April 11th, 2008 at 11:22pm
I love this. I tweet all the time now, open apple - period baby. Thanks for a great script. I use this more than file tagging with QS.
April 15th, 2008 at 8:57am
[...] just made a Tweet inquiry and, thank goodness, they’ve scraped the sign out of the window. I need to make sure none [...]
April 25th, 2008 at 8:03pm
[...] nuff said. [...]
April 26th, 2008 at 1:39am
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale quicksilver twitter applescript (tags: quicksilver twitter applescript) [...]
April 27th, 2008 at 12:31pm
[...] Tweet = Twitter + Quicksilver | Archives | codablog | Coda Hale [...]
May 3rd, 2008 at 6:41am
[...] quick tutorial on how to use Quicksilver to write tweets to your Twitter account.read more | digg story Last 5 posts in GalleryStatus - April 22nd, 2008Google’s April Fool - April 1st, [...]
May 3rd, 2008 at 9:44am
[...] Apps « Who Should I Follow? Tweet = Twitter + Quicksilver May 3, 2008 Tweet = Twitter + Quicksilver - tutorial from codahale.com on how to Tweet using Quicksilver [...]
May 7th, 2008 at 2:21pm
I can’t get this going at all. It’s a problem with my QS installation I’m sure but no Quicksilver folder was created within Library/Application Support. I have created this file myself but basically I can’t get Tweet.scpt to turn up in the action pane. Any ideas?
May 8th, 2008 at 4:33am
[...] 还不支持),甚至最近火得乱七八糟的 Twitter,都有人写了脚本支持用 Quicksilver 发送。在及漂亮的 About [...]
May 10th, 2008 at 9:17am
awesome! But it’s not escaping “+” correctly :(
May 16th, 2008 at 11:18pm
damn you for making quicksilver even more essential!
May 25th, 2008 at 8:05am
Luke:
You should be using the Library from your home folder, not the root.
Re-install QS if you still have no luck.
May 26th, 2008 at 10:46am
Wish I’d known about this before. Kicks the crap out of doing it from Twitterific! Thanks!
June 2nd, 2008 at 5:45am
Love it!
June 9th, 2008 at 7:34am
[...] these instructions I was able to set up a way to Twitter from Quicksilver quickly and easily, check out the video [...]