Launch Final Cut Pro, make a new project and name it with Automator

applescriptautomator

I want to make an Automator app that will do a couple of things for me with Final Cut Pro:

  1. I want it to ask me to name a the new project (we will call it test1)
  2. Then I want it to make a new folder and name it test1
  3. Then I want it to launch Final Cut Pro and make a new project and name it test1

This is what I have accomplished so far:

  1. Run AppleScript

    on run {foldername, parameters}
        display dialog "Please choose name" default answer "untitled"
        set foldername to text returned of result
        return foldername
    end run
    
  2. Set Value of Variable foldername

  3. New Folder foldername
  4. Run AppleScript

    on run {input, parameters}
    application "Final Cut Pro"
    end run
    

I just can’t find any script on how to create a new project, let alone name it.

Best Answer

I don't have any version of Final Cut, but from the MacScripter search results it appears like at least the older versions weren't scriptable. Anyway, have you looked at its AppleScript dictionary (by e.g. dropping its icon on AppleScript Editor)?

Would it be possible to just copy a template file instead of creating a new project? If so, if you saved a script like this as /usr/bin/fcpp and ran chmod +x /usr/bin/fcpp, you could create a new project with fcpp Project name.

#!/bin/bash

mkdir -p ~/Projects/"$*"
cp -r ~/Documents/Test.fcpx ~/"Projects/$*/$*.fcpx"
open ~/"Projects/$*/$*.fcpx"