Use AppleScript to create QuickTime transcription aids

Sep 23, '02 08:40:47AM

Contributed by: jbolden1517

My wife has to do transcription and most of the players are for Windows, and the free one that comes with the pedal doesn't work well. This is a hack to create a pedal-like environment on the keyboard for transcribing Audio/Video files in QuickTime using four AppleScripts (PlayPause, FastForward, Rewind, and Pause).

These scripts run a QuickTime movie in the background and allow for simple keyboard control of the playback while in another application (e.g. MS Word, TextEdit, or any other). The scripts are used in combination with Keyboard Maestro, which allows you to assign AppleScripts to keyboard shortcuts. I assigned each of the following scripts a shortcut. Before using the scripts, open the file you want to transcribe in QuickTime. Make sure it's the active movie.

The four scripts each control a different aspect of playback behavior:

  1. PlayPause: Plays, pauses, and backspaces for 1.5 seconds by pressing one shortcut key (e.g. Option + Spacebar). Press the key, the movie plays. Press the key again, the movie goes back 1.5 second and pauses.
    tell application "QuickTime Player"
    if the movie 1 is playing then
    stop movie 1
    set the current_time to current time of movie 1
    set current time of movie 1 to (the current_time - ¬
    1.5 * (time scale of movie 1))

    else
    play movie 1
    end if
    end tell
  2. FastForward: Fast forwards at two times the speed. Second press will pause the movie.
    tell application "QuickTime Player"
    if the movie 1 is playing then
    stop movie 1
    else
    set rate of movie 1 to 2.0
    end if
    end tell
  3. Rewind: Rewinds at four times the speed. Second press will pause the movie.
    tell application "QuickTime Player"
    if the movie 1 is playing then
    stop movie 1
    else
    set rate of movie 1 to -4.0
    end if
    end tell
  4. Pause: Backspaces for 1.5 seconds and pauses (no matter what the movie is doing).
    tell application "QuickTime Player"
    if the movie 1 is playing then
    stop movie 1
    else
    set rate of movie 1 to -4.0
    end if
    end tell
Create the scripts using AppleScript Editor, of course!

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020923054047650