Final Cut Pro X with Apple script (export projects)

2.2k views Asked by At

Trying to make a script with whom will launch FCPX and will export one project after another (per day need to export 24 videos). So far were able to make this script:

tell application "Finder"
    open ("/Volumes/UpNext/Final Cut Projects/1-Monday/CurrentVersion.fcpproject" as POSIX file)
end tell

delay 14

tell application "System Events"
    tell process "Final Cut Pro"
        click menu item "Snapping" of menu "View" of menu bar 1
        click
    end tell
end tell

Instead of turning on snapping I want to do following: Click in FCPX on /File/Share/Some format. Problem is that don't know how to launch "share" and "needed format", because "Share" is an pop up menu. My apologies for simple questions, unfortunately never in my life worked with scripts and project needs to be done ASAP. Maybe there is other way with scripts to achieve this goal (export many projects). Will be open to suggestions!

1

There are 1 answers

1
CRGreen On

I think the best (maybe easiest) way to do this (at least to get you started) is to set up key commands in System Preferences, and to use the following method to trigger the key command.

So for example, I just used System Prefs (Keyboard>Keyboard Shortcuts>Application Shortcuts) to make a Shift-F1 key command to trigger the "Vimeo..." menu item. Now I can use cliclick to trigger that. Cliclick (http://www.bluem.net/en/mac/cliclick/) is somewhat limited (well, more limited than the version I have on my machine :-) ), but it can come in handy. You just have to use an AppleScript do shell script command to use it:

activate application "Final Cut Pro Trial"
delay 0.5
do shell script "/your/path/to/cliclick kd:shift kp:f1 ku:shift"

The delay makes sure everything settles before the click (w/o the delay, click may fail). (Obviously, replace the path in the example with a correct POSIX path -- mine is installed in /usr/local/bin/)