Skip to content

Instantly share code, notes, and snippets.

@jtwalters
Created March 4, 2014 22:21
Show Gist options
  • Save jtwalters/9357018 to your computer and use it in GitHub Desktop.
Save jtwalters/9357018 to your computer and use it in GitHub Desktop.
Quit and relaunch an application in AppleScript, e.g., Google Chrome—to finish installing updates.
set appName to "Google Chrome"
tell application appName to quit
repeat
tell application "System Events"
if appName is not in (name of application processes) then exit repeat
end tell
do shell script "sleep 0.5"
end repeat
tell application appName to launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment