Created
June 8, 2010 05:32
-
-
Save jeffrafter/429651 to your computer and use it in GitHub Desktop.
Exporting XML from Final Cut Pro using Apple Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
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 | |
tell application \"Final Cut Pro\" to display dialog error_message buttons {\"OK\"} default button 1 | |
end try" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment