Macro'ed Tweets?
April 22, 2009 6:39 AM   Subscribe

I'm looking for options that will allow me to post a tweet to twitter by just pressing some hotkeys/macros. Where I can define that pressing "ctrl-afk" will post a tweet saying: I'm away from my keyboard at the moment.

I want to use twitter to let people know when I'm available to contact. I don't use instant messengers (it would be very difficult to keep track of so many people anyways) - and short of leaving a message on my phone every time I'm away from my desk, twitter seemed the simplest way to say: hey, I'm not here.

I wanted it to be as automatic as possible, because I'm constantly going in and out of my office.
posted by royalsong to Computers & Internet (9 answers total) 1 user marked this as a favorite
 
I have no idea on the twitter side of things, but AutoHotKey is my utility of choice for making keyboard macros.
posted by o0dano0o at 6:42 AM on April 22, 2009


I second AutoHotKey. In order to programmaticaly send a tweet you can use the curl command in Cygwin. Define a tweet script somewhere:
#!/usr/bin/env bash

curl --netrc --data status="$*" http://twitter.com/statuses/update.xml
You will also have to enter something like the following in ~/.netrc:
machine twitter.com login royalsong password yourpassword
Then call the tweet script from AutoHotKey.
posted by grouse at 7:00 AM on April 22, 2009


Response by poster: Grouse, can you be a bit more clear? All the jargon confuses me. What exactly do I need and can you walk me through the code?

I've never used AutoHotKey before.
posted by royalsong at 7:46 AM on April 22, 2009


Sorry, royalsong, I don't have time right now. Maybe someone else has a simpler suggestion for you or can explain how to put my suggestion into practice.
posted by grouse at 7:55 AM on April 22, 2009


What OS, royalsong?
posted by chazlarson at 11:33 AM on April 22, 2009


Response by poster: I'm using windows xp.
posted by royalsong at 11:37 AM on April 22, 2009


OK, if you're willing to double-click something instead of using a hotkey, here's one way to do it.

Install this twitter command-line app.

There are many command-line twitter apps. I chose this one because it asks you questions to configure itself on first use rather than requiring you to edit a config file.

The install will download and install any prerequisites. On my machine, it downloaded and installed Compact SQL Server.

Once it's installed, open a command prompt and type "tweet". It should ask for your twitter username and password.

To test that it's working, type tweet "testing..." and hit return. Your twitter status should change.

Now, to make the double-clicky thing. Create a new text file on your desktop, name it "afk.cmd", and put the following in it:
tweet "I'm away from my keyboard for a moment"
Save, close, and double-click it. A command window will open up, do some stuff, then close. Your twitter status will change.

If you like, create a second new text file on your desktop, name it "bak.cmd", and put the following in it:
tweet "I'm back!"
posted by chazlarson at 12:00 PM on April 22, 2009


Adding on to chazlarson's idea...

If you get that utility installed along with autohotkey, you should be able to do something with the Run command in autohotkey.

The script for autohotkey would look something like this (!a means hitting alt-a) (you might have to play with the run line a bit..):
     !a::
     Run, tweet "I'm away"
     return
Also, here is a Tutorial for autohotkey.
posted by o0dano0o at 12:23 PM on April 22, 2009


For autohotkey:

Create an Autohotkey script file; htis is jsut a text file called "whatever.ahk". Your startup directory would be good if you want this shortcut available all the time.

Put the following in it:
#space::run tweet "Away from keyboard"
#+space::run tweet "Back at keyboard"
Save and double-click it. An "H" icon will appear in your system tray.

Press Windows-space to set your twitter status to "Away from keyboard". Press Windows-shift-space to set it to "Back at keyboard".
posted by chazlarson at 12:31 PM on April 22, 2009


« Older Russian pasta?   |   rent for Baltimore bartender Newer »
This thread is closed to new comments.