Scripting Quicktime Preferencesq

I’m trying to script enabling flash in the Quicktime Pane of the System Preferences. I’m getting close, but no cigar.

This is what I got so far:


tell application "System Preferences"
	activate
	set current pane to pane "QuickTime"
end tell


tell application "System Events"
	tell application process "System Preferences"
		tell tab group 5 of window "QuickTime"
			click checkbox "Enable Flash"
		end tell
	end tell
end tell


It errors out on “Enable Flash.” but I’m not necessarily sure that that is exactly where the problem in my syntax begins. Does Anyone have any suggestions?

Also, I guessed the positions of the checkbox because this setting is on the 5 tab from the left. Is that the way to reference the object?

Thanks

Steve

PS: Running script in Tiger

the tab group is 1 and I added a line to select tab “Advanced”

do you know PreFab’s UI Brower? This tool is very helpful to detect the UI elements
http://www.prefab.com/uibrowser/

tell application "System Preferences"
	activate
	set current pane to pane "QuickTime"
end tell


tell application "System Events"
	tell application process "System Preferences"
		tell tab group 1 of window "QuickTime"
			click radio button 5 -- "Advanced"
			click checkbox "Enable Flash"
		end tell
	end tell
end tell