Last active
December 1, 2016 16:05
-
-
Save robballou/adcab7a454599f1935eb381155e1805e to your computer and use it in GitHub Desktop.
AppleScript to shutdown iTunes and eject an external drive. Change the volumename "Example" to the volume you want to eject. You can run this in Alfred if you want to be extra cool
This file contains hidden or 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
# Stops iTunes and ejects an external drive | |
set appname to "iTunes" | |
set volumename to "Example" | |
tell application appname to quit | |
repeat until application appname is not running | |
delay 1 | |
end repeat | |
tell application "Finder" to eject volumename | |
display notification "Ejected Volume" with title "Eject" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment