AppleScript help please: Final Cut Pro / selecting drop down items
Hi,
I am wondering if anyone can help guide me wih a spot of AppleScript?
I'm new to it as of tonight (last time I made a script was 11 years ago, and that was a very basic one!).
Basically, my problem is I have a long term bug in Final Cut Pro which causes it to crash on launch everytime, unless I delete the Preferences file first.
(btw This problem exsisted in Snow Leopard and has continued with Lion. I think it is plug-in related, but I've never figured out which or why, and have had a topic ongoing on here int he FCP forum for some time with no luck).
Anyway, so far I have made a script which trashed the preferences and launches the program, like this:
try
do shell script "rm /Users/redhavoc/Library/Preferences/Final\\ Cut\\ Pro\\ User\\ Data/Final\\ Cut\\ Pro\\ 7.0\\ Prefs.fcset "
end try
delay 1
tell application "Final Cut Pro" to activate
So far, so good.
However, what I would REALLY like to do, is continue this script to reset all the preferences automatically!
When launching FCP (as the preferences are gone) this is the first thing that comes up:
So, my question is:
How can I choose which items I want selected from the drop down boxes with my AppleScript?
(Specifically, option 7 in the "Format" drop down, and option 3 in the "Rate" drop down, then more complexly, choosing which folder I want in the "Primary Scratch Disk" drop down (which opens an "Open" dialogue) ).
Thanks in advance!
MacBook Pro (2011 Quad 2.3 i7), Mac OS X (10.7.2), 8Gb Ram, 250GB SSD