Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tell application "System Preferences" to activate
tell application "System Events"
tell application process "System Preferences"
delay 5
set currentWindow to name of window 1
if currentWindow does not contain "Profiles" then
click button "Show All" of group 1 of group 2 of toolbar 1 of window 1
delay 5
click button "Profiles" of scroll area 1 of window "System Preferences"
delay 5
end if
tell window "Profiles"
tell scroll area 2
repeat with aRow in row of table 1
if value of static text of UI element 1 of aRow ends with "Enrollment" then
select aRow
delay 2
end if
end repeat
end tell
delay 2
click button "Approve…" of scroll area 1
delay 2
click button "Approve" of sheet 1
end tell
end tell
end tell
tell application "System Preferences" to quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.