Wednesday, May 2, 2012

Transcribe with textmate

Transcribing with TextMate is surprisingly easy. All it takes is a new bundle with two commands, one that takes you back by three seconds, and one that pauses or plays.
#!/usr/bin/env osascript
tell application "iTunes"
     set currTime to get player position
 
     if currTime < 3 then
         set currSkip to 0
     else
         set currSkip to currTime - 3
     end if
 
    set player position to currSkip
end tell

And here is play pause:

#!/usr/bin/env osascript
tell application "iTunes" 
     playpause
end tell