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?
tell application "System Preferences"
activate
set current pane to pane "QuickTime"
end tell
tell application "System Events"
tell application process "System Preferences"
--get properties of UI elements of tab group of window "QuickTime"
click radio button "Advanced" of tab group of window "QuickTime"
click checkbox "Enable Flash" of tab group of window "QuickTime"
end tell
end tell
Just tried it again and it works fine! Here…
Are you sure you have Gui scripting switched on properly…
If any one else is reading this post would someone kindly test this script to see if
it functions on there machine ok…
tell application "System Preferences"
activate
set current pane to pane "QuickTime"
end tell
tell application "System Events"
tell application process "System Preferences"
--get properties of UI elements of tab group of window "QuickTime"
click radio button "Advanced" of tab group of window "QuickTime"
click checkbox "Enable Flash" of tab group of window "QuickTime"
end tell
end tell
Wexie
It may be just a difference in the way our macs are configured… lets see if
anyone else can get it to work…