Skip to content

Instantly share code, notes, and snippets.

@jeffrafter
Created June 8, 2010 05:32
Show Gist options
  • Select an option

  • Save jeffrafter/429651 to your computer and use it in GitHub Desktop.

Select an option

Save jeffrafter/429651 to your computer and use it in GitHub Desktop.

Revisions

  1. jeffrafter revised this gist Jun 8, 2010. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion export.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,6 @@ try
    tell application \"Final Cut Pro\" to activate
    delay 0.5
    tell application \"Final Cut Pro\" to display dialog \"Syncing...\" buttons {}
    tell application \"System Events\"
    tell process \"Final Cut Pro\"
    tell menu bar 1
  2. jeffrafter revised this gist Jun 8, 2010. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions export.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ try
    tell application \"Final Cut Pro\" to activate
    delay 0.5
    tell application \"Final Cut Pro\" to display dialog \"Syncing...\" buttons {}
    tell application \"System Events\"
    tell process \"Final Cut Pro\"
    tell menu bar 1
    @@ -23,6 +24,15 @@ try
    tell its front window
    click button \"OK\"
    end tell
    delay 0.5
    tell its front window
    click button \"Save\"
    delay 0.5
    try
    click button \"Replace\" of sheet 1
    on error error_message
    end try
    end tell
    end tell
    end tell
    on error error_message
  3. jeffrafter created this gist Jun 8, 2010.
    30 changes: 30 additions & 0 deletions export.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #!/bin/sh

    # 'Enable access for assistive devices' must be selected in Universal Access preferences.

    osascript -e "
    try
    tell application \"Final Cut Pro\" to activate
    delay 0.5
    tell application \"System Events\"
    tell process \"Final Cut Pro\"
    tell menu bar 1
    tell menu bar item \"File\"
    tell menu \"File\"
    tell menu item \"Export\"
    tell menu \"Export\"
    click menu item \"XML...\"
    end tell
    end tell
    end tell
    end tell
    end tell
    tell its front window
    click button \"OK\"
    end tell
    end tell
    end tell
    on error error_message
    tell application \"Final Cut Pro\" to display dialog error_message buttons {\"OK\"} default button 1
    end try"