Reaccuring error when UI scripting Preference Pane

I am trying to control the System Preference Pane Universal Access via the UI scripting and keep running into this same error - “System Preferences got an error: «class butT» “Set Display to Grayscale” of window “Universal Access” doesn’t understand the click message.”

Below is my script that produced this error:


tell application "System Preferences"
	activate
	set current pane to pane "com.apple.preference.universalaccess"
end tell

tell application "System Events"
	if UI elements enabled then
		click button "Set Display to Grayscale" of window "Universal Access" of application "System Preferences"
	else
		tell application "System Preferences"
			activate
			set current pane to pane "com.apple.preference.universalaccess"
			display dialog "UI element scripting is not enabled. Check "Enable access for assistive devices""
		end tell
	end if
end tell

Any ideas would be most appreciated.