Re: GUI scripting: is assistive device access enabled?
Re: GUI scripting: is assistive device access enabled?
- Subject: Re: GUI scripting: is assistive device access enabled?
- From: Jeff Ganyard <email@hidden>
- Date: Thu, 1 May 2003 18:00:14 -0700
On Thursday, May 1, 2003, at 05:14 PM, Paul Berkowitz wrote:
On 5/1/03 4:40 PM, "Jeff Ganyard" <email@hidden> wrote:
Hi Folks,
I've been digging all thru the various prefs files and whatever other
docs I can find to figure this out but have come up with nothing so
far.
How can I tell if the 'Enable access for assistive devices' setting is
turned on?
I haven't been able to find any pref or default that refers to it. And
when I run a 'choose menu' command when the setting is off it just
exits. So I can't look for an error...
Any ideas? How can I confirm that a script using this stuff has
succeeded or failed? or can I find out in advance if the script will
be
able to work?
tell application "System Events"
tell process "Finder" -- or some other process
try
get menu bar 1
on error
activate
beep
display dialog "You first need to enable access for
assistive
devices in Universal Access System preferences." buttons {"Cancel"}
default
button 1 with icon 0
end try
end tell
end tell
You can even open the correct pane in System prefs for them if you
want to.
My apologies!
Of course that works, because the 'get' fails.
jeff
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.