Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save varenc/81088c29a4e21e1cfe79ed321599c9b5 to your computer and use it in GitHub Desktop.
Save varenc/81088c29a4e21e1cfe79ed321599c9b5 to your computer and use it in GitHub Desktop.
Pause and Resume Dropbox's syncing from the command line with AppleScript
tell application "System Events"
-- Pause syncing
click menu bar item 1 of menu bar 2 of application process "Dropbox"
click menu item "Pause Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox"
delay 2
-- Now re-enable syncing
click menu bar item 1 of menu bar 2 of application process "Dropbox"
click menu item "Resume Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment