Saturday, November 18, 2017

#1 2016-04-09 02:53:14 pm

mac.jedi
Member
Registered: 2008-04-23
Posts: 43

Accessibility list & Cgwindow list

Hi all,

Two questions…

Is there a way to test if an app is in the accessibility list to control the UI?

Also,  any code available to return the bounds of the preferences window so I can position my window in relation to its position?  I'd like to do something similar to Shane's accessibility applet, but with a startup screen on first launch.

Thanks!

Mac.jedi

Offline

 

#2 2017-03-18 02:18:08 pm

Titanium
Member
From:: ~/Desktop
Registered: 2005-08-22
Posts: 43
Website

Re: Accessibility list & Cgwindow list

mac.jedi wrote:

Hi all,

Is there a way to test if an app is in the accessibility list to control the UI?

Mac.jedi


Mieux vaut tard que jamais... wink

Applescript:

set checkAccessApp to do shell script "sqlite3 /Library/'Application Support'/com.apple.TCC/Tcc.db 'SELECT * FROM access'" with administrator privileges

if checkAccessApp does not contain "com.company.MyApp|0|1|1|" then
   display alert "No Access"
else
   display alert "Access OK"
end if

Of course modify "com.company.MyApp". tongue


iMac 27" 3,4 Ghz - macOS High Sierra
https://www.titanium-software.fr

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)