Well this week I refined the script a little more having discovered how to quit a programme (tell "application" to quit, not exactly rocket science), and how to delay it so that it didn't generate an error by trying to quit before synchronisation was complete.
I also discovered along the way that you could tell your mac to inform you that the task was complete using one of the voices.
The finished script is as follows:
tell application "iSync"
if last sync is less than ((current date) - 3600) then
synchronize
repeat while (syncing is true)
delay 5
end repeat
end if
end tell
tell application "iSync" to quit
say "synchronisation is now complete. Have a good day" using "Zarvox"
You can add a line that hides isync if you want, but it's not that important.
No comments:
Post a Comment