Enable access for assistive devices programmatically on 10.9

前端 未结 9 2143
庸人自扰
庸人自扰 2020-11-27 11:27

I want to enable access for assistive devices programatically on 10.9. On 10.8 and lower I was using following Applescript to enable access for assistive devices:

         


        
9条回答
  •  天命终不由人
    2020-11-27 11:45

    You can edit the TCC.db file in directly. I had to do this in order to make Divvy install without user interaction. Just replace com.mizage.divvy with your program.

    sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.mizage.divvy',0,1,1,NULL);" 
    

    To remove the entry:

    sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "delete from access where client='com.mizage.divvy';"
    

提交回复
热议问题