Friday, September 12, 2008

MacOS X: iSync AppleScript

I wanted to run iSync Priodically everyday so that my mobile and MacBook get synced regularly, this is what I found after some googling:

tell application "System Events" to set isync_running to (name of processes) contains "iSync"
<code><br />tell application "iSync"<br />  activate<br />  if isync_running is not true then<br />      tell application "System Events" to set visible of process "iSync" to false<br />  end if<br />  synchronize<br /><br />  repeat until syncing is false<br />      delay 1<br />  end repeat<br /><br />  if sync status is 2 then<br />      if isync_running is false then<br />          quit<br />      end if<br />  else<br />      activate<br />  end if<br />end tell<br /></code>

save the file with a .scpt extension and add the script in iCal to run every day.

Back to Blogging

After a failed attempt last year to get back to blogging, I'm trying it again this year. I really wanted to get back, but got busy will...