Behold the power of the lazyweb (or lazytwitter for the extra lazy):
The problem:
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](http://skitch.com/jackdanger/e4xu/twitterrific).
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](http://appscript.sourceforge.net/rb-appscript/index.html).
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
-
Justin said:
Nice little script =)
Thanks
-
Ted said:
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
-
Jack Danger said:
@ted: Those are a little harder :-)
blog comments powered by Disqus