Hoopla!

now with extra whiz-bang!

Hoopla!

Skip forward a few seconds in iTunes

April 02, 2008 · 3 comments

Behold the power of the lazyweb (or lazytwitter for the extra lazy):

The problem:

somebody please build this: ten second skip hotkey in itunes/quicktime for those video podcasts with commercials

The solution:

(* 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

Tags:····

3 responses so far ↓

  • 1 Justin // Apr 02, 2008 at 10:44 PM

    Nice little script =) Thanks

  • 2 Ted // Apr 03, 2008 at 04:28 AM

    You rock! I can’t wait to try this.

    How about tackling my other two requests? ;-)

    http://twitter.com/teflonted/statuses/780201740

    http://twitter.com/teflonted/statuses/780137089

  • 3 Jack Danger // Apr 03, 2008 at 11:21 AM

    @ted: Those are a little harder :-)

Leave a Comment