You can define whether your Mac should go to sleep or shut down after all syncs have completed and also execute arbitrary scripts.
- Open the AppleScript Editor (located in /Applications/Utilities).
- Create appropriate AppleScripts by copying the codes given below (or writing your own scripts) into the Editor and saving them, for example, on the Desktop, by giving them a meaningful name.
- Move the newly created files into “/Users/yourusername/Library/Application Scripts/org.desairem.uSync”. (You can navigate to the Library folder by opening a Finder window, selecting the menu Go To and, while pressing the Alt/Option key, selecting the Library menu item.)
- Restart SyncTime. A menu item corresponding to the file you’ve just created is now visible.
tell application "System Events" to sleep
tell application "System Events" to shut down
Play a sound with a given filename (you may store your custom sounds as well in “/Users/yourusername/Library/Application Scripts/org.desairem.uSync”):
do shell script "afplay /System/Library/Sounds/Glass.aiff"
Play a random sound from “/System/Library/Sounds”:
do shell script "afplay /System/Library/Sounds/" & some item of paragraphs of ((do shell script "ls /System/Library/Sounds/"))