Starting from version 1.1.4, you can define whether your Mac should go to sleep or shut down after all syncs have completed (requires macOS 10.8 or newer). Starting from version 2.4.5, you can define arbitrary scripts to be executed after all syncs have completed.
To enable the menu items in the status bar menu, please follow these instructions:
- Open the AppleScript Editor (located in /Applications/Utilities).
- Create appropriate AppleScripts by copying the codes given below into the Editor and saving them, for example, on the Desktop. Starting from version 2.4.5, you may create your own scripts with arbitrary filenames.
- 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/OPT key, selecting the Library menu item.
- Restart SyncTime. The menu item corresponding to the file you’ve just created is now enabled.
The sleep script is a file named „sleep.scpt“ with the following code:
tell application "System Events" to sleep
The shut down script is a file named „shutdown.scpt“ with the following code:
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/"))