Share iTunes song with AutoHotKey and Dropbox

I wanted to quickly share the song that was playing in iTunes with a contact; I’ve been using Dropdox for a while, so I figured that would be a good way to do so. If you don’t have a dropbox account, go get one here. The hardest part was actually getting the link copied to the clipboard; you must currently stick your own user ID into dropbox.ahk as I do not know how to pull that from the system. I was able to get the dropbox folder location, but I don’t know if that will work on other machines.

You need to include the following source files for this to work:

The code I’ve written is all in dropbox.ahk on this server. To use the functions that I wrote, you’d assign it to a hotkey:

;; place these lines in the auto-execute section of the script
COM_Init()

#include COM.ahk
#include iTunes.ahk
#include dropbox.ahk

Media_Stop::
    CopySongToDropbox()
Return

The iTunes library this code depends on it also pretty neat. I’ve included the following in my own script from it:

^#i::
    iTunes_Info()
Return

Media_Next::
    iTunes("NextTrack")
Return

Media_Play_Pause::
    iTunes("PlayPause")
Return

Media_Prev::
    iTunes("PreviousTrack")
Return

Andrew Guyton
http://www.disavian.net/

Leave a Reply