I haven't seen anyone using this exact method of controlling iTunes, and it seems to me to be one of the best and most intuitive. There are any number of AppleScripts and menu items available on the web, but none of them fit my needs. I tend to make large playlists and let them shuffle. My tastes in music being very broad, I often want to skip a particular song, or replay one I just heard, depending on the mood and/or occasion.
Requirements:
- A macro program such as Youpi Key (free) or QuicKeys (commercial).
- iTunes 2 or 3
- Music to listen to
- iTunes Notifier (highly recommended, though optional)
I've tested this with both Youpi Key and QuicKeys, and it is not within the scope of this hint to suggest which you should use. I'll demonstrate with Youpi Key as it is free; QuicKeys has a downloadble time-limited demo that can be used as well.
In the Youpi Key Editor, I added a new Shortcut: Run Script. I named the command "iTunes Play/Pause", assigned it F10, and entered...
tell application "iTunes"...in the script window. Works like a charm, anywhere, anytime, instantly. Hitting it once starts a stopped or paused iTunes, launching it if necessary; hitting it again pauses iTunes, if playing. I also added scripts (to keys F11 and F12) that are almost identical: instead of "playpause", however, they say "previous track" and "next track", respectively.
playpause
end tell
Interestingly enough, this works even if a screen saver is running, at least with Youpi Key. If you normally password-protect your screen saver, be careful what scripts you attach as macro to keys! The screen saver will continue to run, however, so it would be hard to do much damage without access to the desktop or GUI.
The final step to complete this effort at further automating iTunes requires iTunes Notifier. This fades in a floating window (customizable by you) for a preset (short) time with the name of the current track. This works well for me because I don't often remember the names and/or artists of music I don't listen to frequently. It's unobtrusive and can be made translucent, so it doesn't have to obscure your work. I find myself glancing at it only if I need to know the name of the song. Before I found this program, I had to switch back to iTunes via the Dock to find out the name of the currently playing song.
[Editor's note: You can, of course, use iTunes' contextual menu in the dock (control-click on the dock icon) to do exactly what this hint describes, but that would require using the mouse. It's nice to have a keyboard-only alternative.]

