View Single Post
Here is a more advanced shell script to sync. It basically iSyncs twice around one sync of OmniFocus to get every task from and to your mobile device. You can easily adapt it to your needs:

Code:
#!/bin/sh

# quit iSync (because somehow it is more reliable with my mobile with a fresh iSync)
osascript -e 'tell application "iSync" to quit'
sleep 5

# sync and wait
osascript -e 'tell application "iSync" to synchronize'
while [ `osascript -e 'tell application "iSync" to syncing'` = "true" ]; do
      sleep 1
done

# sync OmniFocus
osascript -e 'tell application "System Events" to click button "Sync with iCal" of first tool bar of first window of process "OmniFocus"'
sleep 15

# sync iSync again
osascript -e 'tell application "iSync" to synchronize'
while [ `osascript -e 'tell application "iSync" to syncing'` = "true" ]; do
      sleep 1
done

# quit iSync
osascript -e 'tell application "iSync" to quit'
Stefan