I have the following:
tell application "System Preferences"
activate
set current pane to pane "Displays"
tell application "System Events"
try
tell application process "System Preferences"
click radio button "Arrangement" of tab group 1 of window "Cinema HD"
tell window "Cinema HD"
click checkbox "Mirror Displays" of tab group 1 of window "Cinema HD"
end tell
end tell
end try
end tell
end tell
The only thing that doesn’t work is the checkbox line. I’ve also tried it as checkbox 1, BTW.
What am I doing wrong?
This is 10.6.2.
Apparently this:
click checkbox "Mirror Displays"
Worked under 10.5, but no longer does under 10.6.
Ok. I put in a check, and this is the result:
exists checkbox "Mirror Displays" of window "Cinema HD" of application process "System Preferences"
--> false
set checkbox "Mirror Displays" of window "Cinema HD" of application process "System Preferences" to "Mirror Displays"
--> error number -1728 from «class chbx» "Mirror Displays" of window "Cinema HD" of «class pcap» "System Preferences"
"
Now I’m really confused. I ran UI Browser on it and it says
checkbox “Mirror Displays” (checkbox 1)
So it exists. Yet, no matter what I try, exists says it doesn’t!
grrrrrrrrr…!