Re: Reading word at mouse pointer w/o Universal Access
Re: Reading word at mouse pointer w/o Universal Access
- Subject: Re: Reading word at mouse pointer w/o Universal Access
- From: Adam Leonard <email@hidden>
- Date: Sun, 2 Mar 2008 15:00:50 -0800
Just so you know, the Accessibility API has AXMakeProcessTrusted(),
which will enable access to the API for just your application. It
requires that it be called from a process running as root, so the user
needs to enter his/her password, but otherwise it is fully automatic.
I blogged about it a while ago here: http://caffeinatedcocoa.com/blog/?p=12
There is also some sample code included.
Adam Leonard
On Mar 2, 2008, at 6:24 AM, Ryan Homer wrote:
Steve,
While I agree that the user should decide whether or not to allow
the application to access another's text, to me, that's exactly what
they are doing if they decide to use the application. It is going to
be a dictionary-type application, so if the user installs it, s/he
would be fully aware that its use would entail moving the mouse
pointer over a word in another application. The application would be
just about useless without that feature - so might as well delete it
if you don't want that feature. It's just that I don't want to
require that the user have to enable access for assistive devices.
The first time I came across that, I was hesitant to enable that
without knowing more about it and how many more services I would be
keeping running all the time in the background, etc. This made me
hesitant to even use the application that wanted to turn this on.
On 28-Feb-08, at 8:59 PM, Steve Christensen wrote:
I don't have specific knowledge but, yes, I would expect that the
dictionary support is a trusted part of the OS, thus can be hooked
into every application.
As far as I know, if you want to touch another application's UI,
you have to go through accessibility. From the OS's point of view
yours is just another application, so it seems reasonable that the
user should decide whether or not to allow your application to see
what's going on in another.
steve
On Feb 28, 2008, at 5:33 PM, Ryan Homer wrote:
Let me clarify that it doesn't seem to be the Dictionary
application that's reading the word at the mouse pointer but
rather the OS itself or some daemon, perhaps, when Ctrl-Option-D
is pressed. It might be the process called DictionaryPanel that
seems to always be running.
Anyway, if anyone can point me to the appropriate functions/
methods/classes that might be involved in doing such a thing w/o
the aforementioned techniques, please let me know.
On 28-Feb-08, at 8:27 PM, Ryan Homer wrote:
I've read this post (http://lists.apple.com/archives/accessibility-dev/2006/Aug/msg00007.html
) about using the accessibility options to read the text under
the cursor. However, this requires that the user enable access
for assistive devices in System Preferences. The application must
therefore check for that. It also seems quite complicated; I
don't want to have to deal with glyphs and the like - I only want
the text under the cursor, full stop.
The Dictionary application is able to read a word under the
cursor without enabling access for assistive devices.
Does anyone therefore know of an alternative way to do this?
Thanks in advance.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
@gmail.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden