Skip to content

Instantly share code, notes, and snippets.

@benjamin-ict
Last active January 5, 2021 20:14
Show Gist options
  • Save benjamin-ict/e0212ccae499d9d860466aefb21fffcc to your computer and use it in GitHub Desktop.
Save benjamin-ict/e0212ccae499d9d860466aefb21fffcc to your computer and use it in GitHub Desktop.
Applescript that opens settings, etc and takes screenshots for Inncretech security compliance
set delayLength to 3
set updateDelayLength to delayLength * 10
tell application "About This Mac"
activate
end tell
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.desktopscreeneffect"
reveal anchor "ScreenSaverPref" of pane id "com.apple.preference.desktopscreeneffect"
delay delayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/screen-saver.jpg"
set the current pane to pane id "com.apple.preference.security"
reveal anchor "General" of pane id "com.apple.preference.security"
delay delayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/password-required.jpg"
reveal anchor "FDE" of pane id "com.apple.preference.security"
delay delayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/disk-encryption.jpg"
reveal anchor "Firewall" of pane id "com.apple.preference.security"
delay delayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/firewall.jpg"
set the current pane to pane id "com.apple.preferences.softwareupdate"
delay updateDelayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/update.jpg"
end tell
tell application "Terminal"
do script "echo Password Last Changed:;timestamp=`dscl . read /Users/$USER | grep -A1 passwordLastSetTime | grep real | awk -F'real>|</real' '{print $2}' |
dscl . read /Users/$USER | grep -A1 passwordLastSetTime | grep real | awk -F'real>|</real' '{print $2}'`;itimestamp=`printf '%0.f' $timestamp`;date -r $itimestamp"
activate
delay delayLength
do shell script "screencapture -tjpg " & "$HOME/Desktop/password-changed.jpg"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment