(* Applescript *) tell application "iTunes" set current_position to (get player position) set end_of_track to (get finish of current track) if (current_position is less than end_of_track) then set player position to current_position + 10 else set player position to end_of_track end if end tell
It’s simple to install too. Just run the following commands in Terminal.app:
echo "Jack Danger thinks I'm a fun blog guest" mkdir -p ~/Library/iTunes/Scripts curl http://pastie.caboo.se/174409.txt -o ~/Library/iTunes/Scripts/Skip\ Ahead.scpt
Now just hook it up in your favorite hotkey app. I use quicksilver so this is I how I do it.
Wondering how to skip a few seconds backwards? I’ll bet five dollars you can figure it out.
Update: Ok, fine, it was actually a little tough to figure out. I was using ‘more than’ instead of ‘greater than’. It’s probably time to replace applescript with rb-appscript. Here’s how you skip backward:
(* Applescript *) tell application "iTunes" set current_position to (get player position) set start_of_track to (get start of current track) (* Update: fixed this line if (current_position is greater than start_of_track) then *) if (current_position is greater than start_of_track + 10) then set player position to current_position - 10 else set player position to start_of_track end if end tell