UI Scripting: Turn on helper

UI scripting turns loose many AppleScript features. Unfortunately it’s turned off until you turn it on. This script will bring up the Preferences Universal Access window and a dialog telling the user to make sure it’s checked. This scriptlet is very handy when you distribute an Automator app that uses UI scripting. Very nice little scriptlet, which I cannot take credit for. Modified from a script found on the Bayport NY Fire Department site:

--UI Scripting helper
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "Make sure \"Enable access for assistive devices\" below is checked to run this app."
end tell