soeren says

Quicksilver + Twitter + iChat Status (1 update)

January 30th, 2007

A user of Twittereeze, Seth Dimbert, asked me if it would be possible to have its iChat syncing, but not Twitterrific as a Twitter client.

Specifically, he preferred to use Quicksilver instead, and pointed me to an AppleScript that already gets the Twitter part done.

Luckily, that script already has a variable (tweet) that contains the message we wish to set. So all we need is one line to add the iChat info:

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 ("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

    tell application "iChat" to set status message to tweet

    return nothing
  end process text
end using terms from

That line beginning with tell application "iChat" is all that’s new.

There’s a minor nig with this; specifically, due to AppleScript limitations, Quicksilver might stall for a few seconds while sending the information to iChat. This is particularly jarring when you use a Quicksilver display that is right in the middle of the screen and always on top. :-) Fixing that, however, would probably amount to a far more complicated setup, and the above should be good enough for most purposes.

I don’t personally use Quicksilver so I can’t test it, but I’m told it works exactly as expected.

You can do the same with Skype and Adium as well, but not with MS Messenger (it has no external way I know of to change the status) nor Yahoo! Messenger (it does have a way, but it involves Services, and I don’t know whether or how it’s possible to interface with them inside AppleScript).

Update: He has since posted about it over at his blog.

Posted in AppleScript, Chuckellania, Internet, Programming, Twittereeze, Web

Share

Others' Thoughts

# Eric

Sweet! All good here! Thanks.

Your Own Thoughts

I'd love to hear your input. Just try to stick to a few rules:

Before you comment for the first time (or, after you have deleted cookies), you will have to answer a little challenge to prove that you are not a spammer.

Comments are written in Markdown.

Leave the country the same, but correct the continent, and end the sentence with a period instead.