Re: Executing AppleScripts from an 'AXTrustedProcess'
Re: Executing AppleScripts from an 'AXTrustedProcess'
- Subject: Re: Executing AppleScripts from an 'AXTrustedProcess'
- From: Rainer Brockerhoff <email@hidden>
- Date: Mon, 2 Feb 2009 18:16:47 -0200
At 12:00 -0800 02/02/09, email@hidden wrote:
>Date: Mon, 2 Feb 2009 14:53:17 -0500
>From: Tobias Zimmerman <email@hidden>
>Message-ID:
> <email@hidden>
>
>I am working on an application that moves windows between displays by
>executing AppleScripts (primarily against "System Events"). I have
>found that granting my application rights using AXMakeProcessTrusted
>(or, more accurately, the command line equiv of 'sudo chown
>:accessibility appname; sudo chmod g+s appname'), causes the
>AppleScripts to fail with error -2709 (cannot access scripting
>dictionary). (I also tried after calling AXMakeProcessTrusted on my
>app from a helper agent
I use AXMakeProcessTrusted() myself.
>First, is this a bug, or a security feature that restricts trusted
>processes from executing AppleScripts that call other applications'
>scripting dictionaries?
I seem to recall it's a recent security feature... setuid/setgid apps have such restrictions now. No doubt they'll have more in future releases.
>Second, is there a way around it, or am I stuck requiring my users to
>turn on "Enable access for assistive devices" globally? When that is
>on, the app works fine; but when it is granted individual permissions
>it fails.
For your specific case, why don't you move the windows directly using Accessibility? (I'm doing this myself in an upcoming app.) It's more work but rarely fails.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
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