Skip to content

Instantly share code, notes, and snippets.

@aont
Created February 12, 2012 10:37
Show Gist options
  • Save aont/1807804 to your computer and use it in GitHub Desktop.
Save aont/1807804 to your computer and use it in GitHub Desktop.
Apple Script Shutdown
#!/usr/bin/osascript
-- tell application "loginwindow" to «event aevtrrst»
tell application "loginwindow" to «event aevtrsdn»
tell application "System Events"
tell window 1 of process "loginwindow"
click checkbox 1
-- click button 2
end tell
end tell
@spookey
Copy link

spookey commented Dec 1, 2016

How about tell app "System Events" to shut down?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment