Hello,
I've run into a problem that has me a little confused. I've written an application that is using the Accessibility API's to gather some information about window titles for running applications in the system. I'm ensuring that access is enabled, and when I run my application, say, through Terminal, everything runs as expected.
However, my application is one that I need to have running while a user is logged into a GUI session, and I'm trying to make use of the launchd Launch Agents structure to start my application. I have my application starting now, but I noticed that all my accessibility API's are now failing. For example, a call to AXUIElementCopyAttributeValue() always returns kAXErrorCannotComplete. I added in the call to AXIsProcessTrusted(), and for some reason, when I run through launchd, this returns FALSE. If I run my application through the Terminal, this returns TRUE.
Is there some key in the agent plist that I'm missing to ensure my app has access to the accessibility APIs when run through launchctl?
Thanks in advance! Andrew Cheyne Senior Software Developer GridIron Software
|