Created
March 4, 2014 22:21
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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