Advertisement
gdeff

Click Allow

Nov 7th, 2020 (edited)
3,474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "System Events"
  2.   tell application "System Preferences"
  3.     activate
  4.     set current pane to pane id "com.apple.preference.security"
  5.     reveal anchor "General" of pane id "com.apple.preference.security"
  6.   end tell
  7.   try
  8.     click button "Allow" of tab group 1 of window "Security & Privacy" of application process "System Preferences" of application "System Events"
  9.   on error
  10.     display dialog "No \"Allow\" button to click, script does not have access, or preferences pane is locked?" buttons {"OK"}
  11.   end try
  12. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement