Itunes is the music management software from Apple [http://www.apple.com/itunes/]. It can be used to manage music files, podcasts, and now videos. On windows, there is also a COM interface. The documentation for this is available via the itunes sdk [http://developer.apple.com/sdk/itunescomsdk.html], as well as samples in javascript. ---- On Mac OS X, you can control iTunes via [AppleScript] using the Tclapplescript extension, or you can even send raw apple events using the [TclAE] extension. You can pretty much control everything in this way, playing specific songs, managing playlists, and so on. For an example of this, implementing an iTunes controller inside [Alpha], see http://mat.uab.es/~kock/alpha-tcl/iTunesController.tcl.gz (Recall that Alpha is an extremely powerful editor, written mostly in Tcl -- it's really paradise for Tcl scripters!) The Windows example below (the initial content of this page, by an anonymous author) implements a global hotkey. To do this in OSX, you should probably have a look at the hotkey example provided by [DAS] using [ffidl]. ---- The examples below really only make sense on Windows. ---- The setup: with geoshell [http://www.geoshell.com/], hotkeys can be (fairly) easily created to do things like control the volume of the machine, mute, etc. These hotkeys are global hotkeys since they do not depend on any particular application to have focus. itunes for windows has some hotkeys to handle volume, pause, etc, but they are not global. I prefer to keep itunes minimised and peeking out from the system tray, so giving focus to itunes can be problematic at times. So, I wrote a series of tcl scripts to control itunes via COM. (for those without geoshell, a short cut of these tcl scripts can be used to create a hotkey. twapi [http://twapi.sourceforge.net] can be used to create shortcuts as well. An example of this here [http://twapi.sourceforge.net/hotkey.example].) First, pause/play. When run, this script will pause and unpause itunes. This is very sensitive to context, though: whatever item the cursor is on is what gets played. package require tcom set iTunes [::tcom::ref createobject "iTunes.Application"] $iTunes PlayPause exit Simple enough. Next, I create a hotkey for geoshell. When pressing control+window+p, the following command gets executed "c:\tcl\bin\wish.exe" "C:\Documents and Settings\wl\batch\itunes_pause_play.tcl" and all seems good. To expand on this, I next create a pair of tcl scripts to control the volume package require tcom set interval -2 set iTunes [::tcom::ref createobject "iTunes.Application"] set vol [$iTunes SoundVolume] if {[incr vol $interval] <= 0} { set vol 0 } $iTunes SoundVolume $vol exit and package require tcom set interval 2 set iTunes [::tcom::ref createobject "iTunes.Application"] set vol [$iTunes SoundVolume] if {[incr vol $interval] >= 100} { set vol 100 } $iTunes SoundVolume $vol exit I create hotkeys for control+window+down to call the first script, and control+window+up to call the second script. ---- [Category Application] [Category Music]