Stubborn Checkbox

I’ve written a script using system events that attempts to click on a
checkbox implemented inside of a table view. The following code does
not work:

activate application “System Preferences”
tell application “System Events”
tell process “System Preferences”
click checkbox 1 of row 1 of table 1 of scroll area 1 of splitter
group 1 of tab group 1 of window 1
end tell
end tell

This stubborn checkbox will not be clicked! Can anyone offer
an idea?

I’m having a similar problem with Flash 8. In the Export QuickTime Video dialog, there are two checkboxes. I’ve used the UI inspector to make sure I’m pointing at the first one correctly. When I tell it to click, the checkbox blinks, but the checkmark won’t disappear, and its value is still set to 1 (true/checked/etc.).

Here’s my test code:


activate application "Flash 8"
delay 1

tell application "System Events" to tell application process "Flash" to tell window "Export QuickTime Video"
	click checkbox "Maintain aspect ratio"
end tell

I’ve gotten around that problem using the inexpensive background application “Extra Suites” (http://www.kanzu.com). It allows you to move the mouse pointer to a specific location and click it. To click an unresponsive checkbox, you can do something like the following:


tell application "System Events" to tell application process "Flash"
	set frontmost to true
	tell window "Export QuickTime Video" to set {x, y} to position of checkbox "Maintain aspect ratio"
end tell
tell application "Extra Suites"
	ES move mouse {x + 5, y + 5}
	ES click mouse
end tell

And voila, the check box gets clicked! (The “+ 5” moves the pointer slightly to the right and down so that it is centered inside the checkbox.)

bmose