
I tend to listen to Podcasts (one of the best is MacBreak Weekly) while I work. But when my wife starts talking to me from the other room, I have to stop what I’m doing to navigate to iTunes just to click Pause. It finally reached a level of annoyance that made me fired up Script Editor and throw together a little script to do it for me. This is just about as simple an Apple Script as you can get:
tell application “iTunes”
playpause
end tell
Now, just save it as an application and bind it to some key you’re not using. I used one of the buttons on my Wacom Tablet. One key press and the podcast will either pause or play depending upon its current state.
It’s so great that Apple included a little hook for the Pause/Play function. This is yet another great feature of OSX. If something’s missing that you really want it to do, chances are that a short Apple Script or Automator Action can remedy the situation.
I think this little trick will hold me over until that new keyboard sees the light of day.
Technorati Tags: Apple, AppleScript, Mac, Programming, iTunes, Tip
July 29th, 2007 at 10:32 pm
…why not use the keyboards MUTE key?
July 30th, 2007 at 2:18 am
Because then I have to “rewind” back to the point where I left off. With the mute key, the podcast just continues to play silently.
July 30th, 2007 at 3:00 am
How about fading out the sound, just before you pause…
tell application “iTunes”
activate
set nOldSoundVolume to sound volume
repeat with nSoundVolume from sound volume to 0 by -2
set sound volume to nSoundVolume
delay 0.1
end repeat
pause
set sound volume to nOldSoundVolume
end tell
July 30th, 2007 at 9:49 am
http://lifehacker.com/software/how-to/control-itunes-with-quicksilver-259373.php
I wonder this is relevant for your usage preference or not. But, I rather amused with the functionality it provides, hit Cmd+Spacebar PP [enter], everywhere works like a charm to pause play iTunes, and more.