Update: Auto-iSync your mobile phone with your Mac
After implementing my solution to automate synchronising the calendar and address book of my new Sony Ericsson K800i and my Mac two days ago, I ran into problems multiple times — a short time after booting it up I could hear my MacBook Pro’s fan (very unusual — normally it’s quiet as hell!) and I noticed it lagged in comparison to the usual speed.
As an aside, BluePhone Elite wasn’t responsive either a short time after the synchronisation had finished and iSync didn’t quit in the majority of cases, although it should according to the snippet of AppleScript I had found on the net.
After consulting the Activity-Monitor utility I primarily thought it was BluePhone Elite’s fault — it used around “140%” of CPU power all the time. But then I took another look at the AppleScript’s source.
Turns out the code contained the following:
repeat until syncing is false
if syncing is false then
quit
end if
end repeat
Some strange lines of code, huh? — I deleted them from the script. And what a surprise — it ran perfectly without eating up a lot of computing power.
This time however I had another problem: iSync wasn’t terminated after the synchronisation — I thought about a solution for this and came up with the following code:
tell application "iSync"
activate
synchronize
repeat until syncing is false
delay 1
end repeat
quit
end tell
This AppleScript executes iSync, starts and then waits for the synchronisation to finish — this is checked only once every second and therefore needs nearly no computing power to run. When syncing is false (thus the synchronisation is finished), my new AppleScript quits iSync and terminates.
It’s running really smooth — looks like a decent solution by now. Yay!
Trackbacks & Pingbacks
- JulianSchrader.de | Auto-iSync your mobile phone with your Mac pingbacked Posted December 13, 2006, 9:16 pm
- JulianSchrader.de | App: Sync now! — Automatic synchronisation revisited pingbacked Posted December 15, 2006, 12:07 am
Comments
Leave a Comment
Additional comments powered by BackType
here is another script based on yours.
if it is compile as a program and ypu run it, it will try 100 times within interval of 600 seconds to connect with the phone and sync.
here is the code:
set cnt to 0
repeat until cnt is 100
tell application “iSync”
activate
synchronize
repeat until syncing is false
delay 1
end repeat
quit
end tell
delay 600
set cnt to cnt + 1
end repeat
Hi, how do you actually use this? Does it run on boot somehow? Thanks.
Hi Dave,
as stated in the original article [1], this script is triggered as BluePhone Elite notices that the phone is in range and can be synced via Bluetooth.
[1] http://julianschrader.de/20061211-auto-isync-your-mobile-phone-with-your-mac/
I don’t use this script anymore today as I have an iPhone now, which unfortunately doesn’t sync wirelessly.
Julian