• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Automatic enabling of assistive device support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic enabling of assistive device support


  • Subject: Re: Automatic enabling of assistive device support
  • From: "William J. Cheeseman" <email@hidden>
  • Date: Wed, 17 Oct 2012 17:58:52 -0400


On Oct 17, 2012, at 7:51 AM, Dave Poirier <email@hidden> wrote:

Is there a way for an assistive application to enable at runtime the support for assistive device? Obviously prompting the user for his admin password and authorization is quite fine; but I would rather avoid having the user to go manually in system preferences to enable it.

Yes, there is a way. Apple's System Events application, which is the basis of GUI Scripting in AppleScript, includes a settable property that enables access for assistive devices: 'UI element enabled'. My UI Browser product generates the following AppleScript handler for you, at the top of the AppleScript menu:

on enabledGUIScripting(switch)
   -- Call this handler and pass 'true' in the switch parameter to enable GUI Scripting before your script executes any GUI Scripting commands, or pass 'false' to disable GUI Scripting. You need not test the 'UI elements enabled' setting before calling this handler, because authorization is required only if 'UI elements enabled' will be changed. Returns the final setting of 'UI elements enabled', even if unchanged.
   tell application "System Events"
      activate -- brings System Events authentication dialog to front
      set UI elements enabled to switch
      return UI elements enabled
   end tell
end enabledGUIScripting

That's for use in an AppleScript script, obviously.

But you can also embed an AppleScript command setting the 'UI elements enabled' property in a Cocoa application, and call it from a button. menu item, or whatever. I do that in several of my products.

A free 30-day trial version of UI Browser is available at <http://www.pfiddlesoft.com/uibrowser>.

-- 

Bill Cheeseman - email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Automatic enabling of assistive device support (From: Dave Poirier <email@hidden>)

  • Prev by Date: Re: Automatic enabling of assistive device support
  • Next by Date: VoiceOver Braille table
  • Previous by thread: Re: Automatic enabling of assistive device support
  • Next by thread: VoiceOver Braille table
  • Index(es):
    • Date
    • Thread