Useful Apple script

Here is a useful AppleScript that I use to synchronize my mac with my phone over bluetooth.

Add this to crontab:

30 11,16 * * 1,2,3,4,5 osascript /Library/Application\ Support/iSync/SyncNow.scpt

Here are the contents of SyncNow.scpt :

tell application "Finder"
set iSyncRunning to (number of items in (processes whose name is "iSync") is greater than 0)
tell application "Finder" to set visible of process "iSync" to false
tell application "iSync" to synchronize
tell application "iSync"
repeat while (syncing is true)
end repeat
if iSyncRunning is not true then
end if
end tell
end tell

Leave a Reply

Your email address will not be published. Required fields are marked *