Skip to content

Instantly share code, notes, and snippets.

@Bas-Man
Created January 17, 2019 01:52
Show Gist options
  • Save Bas-Man/1abb5dafe36f0f06f727b00a214e855e to your computer and use it in GitHub Desktop.
Save Bas-Man/1abb5dafe36f0f06f727b00a214e855e to your computer and use it in GitHub Desktop.
AppleScript to launch applications only after external drive has been mounted.
set diskIsMounted to false
repeat until diskIsMounted is true
delay 30
tell application "Finder"
if (disk "Drobo" exists) then
set diskIsMounted to true
end if
end tell
end repeat
#Launch applications since Drobo is mounted
tell application "Resilio Sync" to activate
tell application "Dropbox" to activate
tell application "Plex Media Server" to activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment