GUI scripting Final Cut Pro

I’m trying to write an AppleScript by GUI scripting (using the System Events application), and I can get it all to work until I have to tell the script to click the “Now” button in the “Log and Capture” window.

Is there anyone out there who has GUI scripted FCP, and can tell me how to click that button? The UI Inspector doesn’t show any buttons or tabs or anything for that window, and I can’t figure out how to reference that button.

Thanks!

Model: Mac Pro
Browser: Safari 523.10
Operating System: Mac OS X (10.5)

For those interested, I was able to figure it out. There is a keyboard shortcut, shift-c. We found it buried in the help somewhere. So, here’s the script that I finally came up with:

tell application “Final Cut Pro”
activate
end tell
tell application “System Events”
tell process “Final Cut Pro”
click the menu item “Log and Capture…” of the menu “File” of menu bar 1
delay 4
key down “shift”
key down “C”
delay 2
key up “C”
key up “shift”
delay 70
keystroke return
click the menu item “Log and Capture…” of the menu “File” of menu bar 1
end tell
end tell

What this does is to open the “Log and Capture” window, start a capture, and then wait until the capture limit is reached, click the “OK” button on the dialog box that comes up at the end of the capture, and then closes the “Log and Capture” window. I had the capture limit set to 1 minute, so the “delay 70” in the code above waits 1 minute plus 10 seconds before hitting the “OK” button. This works fine in our case, because we always record for a set amount of time, so we will just have this script wait that long + a bit extra.

The plan is to schedule several occurances of this script per day, to record all the classes we need to record.

Model: Mac Pro
Browser: Safari 523.10
Operating System: Mac OS X (10.5)