-
Using Automator (Leopard) with FCP for repetitive tasks
I thought you all might be interested to know I’ve managed to use Automator’s new “Watch Me Do” feature in 10.5 (Leopard)
to automate a rather complex sequence of events.It’s pretty useful for repetitive tasks like the one I’m doing now
which is replacing a set of 4 pictures in a simple animated sequence,
opening the inserted picture’s properties page,
copying each picture’s filename (which has been strictly standardized for the execution of the next step)
pasting it into Livetype, stripping away the .jpg to make it a “title” (ie Alexandre Pato.jpg becomes Alexandre Pato)
saving as the same filename but replacing .jpg with .ipr,
returning to FCP, importing the newly created livetype file,
inserting it into the graphic sequence, repositioning and proceeding to the next item.Essentially, automator works very well if you can do everything with keyboard strokes,
however I was suprised that certain steps that necessitated mouse clicking
(ie when replacing template pictures with the new pictures with paste attributes->click contents)
it worked very well.Because of certain ways that FCP works it is sometimes necessary to have certain conditions in place before the scripts work
(eg auto-select tracks are toggled by cmd-numpad0,
there is no absolute deselect or select,
so if a sequence has all, none or some auto-select tracks enabled,
you do not know how the shortcut cmd-numpad0 will react, either selecting all or deselecting all)
In my case, I made it such that all working sequences had all auto select track disabled.That said, it opens a vast array of options which I think is very exciting in an incredibly nerdy way.
Here is a full list of the commands automated in this script
Prerequistes* Playhead on first frame of first image
* Image sequence with 4 images to be inserted placed directly after it
* Each nested sequence has image to be replaced selectedCommands
1. cmd-5 (select effects palette)
2. cmd-3 (select timeline-the timeline needs to be selected but if i only put a cmd-3 when it’s already selected it deselects, hence the cmd-5 first as deselecting the effects palette does not affect the execution of the script.
3. cmd-numpad1 (auto-select video track1)
4. x (select image1)
5. cmd-x (cut image)
6. ctrl-g (close gap) This brings the next image adjacent to the image sequence to be processed after
7. left arrow (playhead to last frame of the 5 layer image sequence)
8. cmd-numpad1 (deselect auto-select video track 1)
9. cmd-numpad2 (select auto-select video track 2)
10. opt-enter (open video nest)
11. opt-v (paste attributes of copied picture file to pre-selected placeholder picture)
12. click (select contents)
13. enter
14. cmd-9 (open picture attributes)
15. cmd-c (copy filename)
16. escape
17. mouse click livetype in dock
18. esc (this is to close any file dialogs that might be open)
19. cmd-2
20. cmd-1 (same as selecting effects palette then timeline in FCP, selecting a non crucial window first to ensure that selecting desired window does not deselect it if it is already active)
21. cmd-a (select all text)
22. cmd-V (paste copied filename ie Ep 1 Connections Alexandre Pato.jpg)
23. down (go to end of text)
24. backspace x 4 (deletes .jpg)
25. up x 2 (go to start of text)
26. opt-delete x 3, then delete (deletes Ep 1 Connections )
27. cmd-shift-s
28. cmd-v, backspace x 4, enter (paste filename then delete .jpg, and enter)
29. escape (clears any error dialog)
30. click FCP in dock
31. cmd-i (import)
32. cmd-shift-g (go to folder)
33. /Volumes/disc/folder/livetype
34. cmd-2 (switch to detail mode-you should set it to sort by modified date from oldest to most recent)
35. up (to select most recently created file)
36. cmd-3 (switch back to 3 column mode)
37. enter
38. cmd-5
39. cmd-4 (select file browser)
40. enter (open imported livetype in viewer)
41. cmd-3 (select timeline)
42. home (move playhead to start of sequence)
43. cmd-numpad3 (autoselect video track 3)
44. x (mark placeholder livetype clip on track 3)
45. F6-3 (set viewer video patch to video track 3)
46. F10 (overwrite placeholder livetype)
47. home, enter (select and open overwritten livetype file)
48. cmd-shift-] x 2 (i’ve bound this to navigate tabs, this opens the motion tab)
49. tab, 100, tab x 3, 250 (set scale to 100, location to x=0 y=250)
50. cmd-5
51. cmd-3 (select timeline)
52. ctrl-w (close nested sequence tab)
53. cmd-numpad2 (deselect autoselected video track 2 as in step 9)
54. right (move to next image)the cycle repeats with the next image but selecting a different track in the image sequence.
This process takes 8 minutes 26 seconds for automator to execute.
I take about 3, but with more than 80 of these to do, it is very tedious so I scripted it to do about 12 episodes at once and left to do other errands.It has great possibilities for workflow optimization and repetitive tasks so I thought you all might be interested.