Created
October 12, 2019 15:56
-
-
Save dexterleng/28b235f8719da80fe7cffd19115e9a7a to your computer and use it in GitHub Desktop.
Grant accessibility permissions AppleScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
tell its application process "System Preferences" | |
tell its window "Security & Privacy" | |
tell its tab group | |
tell its group 1 | |
tell its scroll area 1 | |
tell its table 1 | |
set theRows to rows | |
set numRows to count of rows | |
repeat with i from 1 to numRows | |
tell its row i | |
set c to item 0 of its UI element | |
set appName to value of attribute "AXValue" of static text 1 of c | |
if appName is equal to "Vimac.app" then | |
click checkbox of c | |
click checkbox of c | |
end if | |
end tell | |
end repeat | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment