Re: Noobie having trouble getting to first base..
Re: Noobie having trouble getting to first base..
- Subject: Re: Noobie having trouble getting to first base..
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 03 Jan 2008 11:09:46 -0500
- Thread-topic: Noobie having trouble getting to first base..
on 2008-01-03 10:44 AM, David Hoerl at email@hidden wrote:
> So, in googling this error, it appears that my app needs to be
> "trusted". I add another test to my code:
>
> AXIsProcessTrusted() -> 0
>
> Thus, it would appear I need to make my app trusted by calling
> AXMakeProcessTrusted(path) once, as root. Apple just released updated
> sample code that shows the current recommended way of doing this:
>
> http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html
>
> Pondering my next move, I suddenly recall "Hey, I don't remember UI
> Browser asking me to authenticate itself!" [But it could have, and I
> just forgot!]
>
> So, before I go and do all this work to adding in the authentication,
> I figured I just post here first and see if I'm on the correct path
> (and also, how did UI Browser do it?)
The most common way to enable your app to use the accessibility API is to
tell your users to turn on the "Enable access for assistive devices" setting
in the Universal Access pane of System Preferences. UI Browser asks you to
do that, and it even offers to open that preference pane for you to make it
easier on the user.
Turning on this setting of course enables ALL applications to use the
accessibility API. Because of this, and in order to make it unnecessary to
ask the user to turn on the setting manually, Apple introduced the
AXMakeProcessTrusted() function in Tiger as another option (although it is
said not to work in Tiger due to a bug). I have the AXMakeProcessTrusted()
function working in a future release of UI Browser under Leopard. However,
it takes some work, and in the initial stages of developing your app it may
make more sense to just turn on the preference setting manually.
If you already have the preference setting turned on, then you're barking up
the wrong tree. Something else is causing your problem. An app need not be
"trusted" to use the accessibility API if the preference setting is turned
on globally.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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