How can I test, by script, if MobileMe is syncing ? I checked activity monitor and “SyncServer” and “dotmacsyncclient” show no activity even when the menu bar icon is confirming that MobileMe is syncing.
Is there a test that will provide a sure way of knowing that MobileMe is syncing ?
on mobileMeIsSyncing()
try
do shell script "/bin/ps -arxo comm | /usr/bin/grep dotmacsyncclient"
return true
on error
return false
end try
end mobileMeIsSyncing
Your script returns «false» even when the arrow is turning. There must be a problem with MobileMe servers … The arrows spins for a very long time and “SyncServer” and “dotmacsyncclient” do not show any activity level in ActivityMonitor.
I think, the running processes are relevant, not the GUI.
For safety you can add a routine, which checks, if dotmacsyncclient remains being off for the next x seconds
I understand that you thinkk that ActivityMonitor is displaying correctly and that the circling arrow is a glitch in refreshing the UI ! OK … how do you script « being off for the next x seconds» ?
property securityDelay : 5
repeat until mobileMeIsSyncing() -- checks if sync has started
delay 1
end repeat
repeat
repeat while mobileMeIsSyncing() -- check if sync has stopped
delay 1
end repeat
delay securityDelay
if not mobileMeIsSyncing() then exit repeat -- check if sync
end repeat
on mobileMeIsSyncing()
try
do shell script "/bin/ps -arxo comm | /usr/bin/grep dotmacsyncclient"
return true
on error
return false
end try
end mobileMeIsSyncing