Działanie skryptu:
1. Włączenie Bluetooth
2. Synchronizacja iSync przez Bluetooth np. z telefonem
3. Wyłączenie Bluetooth

-- włącza bluetooth
tell application "System Events" to tell the front menu bar of process "SystemUIServer"
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with x from 1 to the length of menu_extras
if item x of menu_extras is "bluetooth menu extra" then exit repeat
end repeat
tell menu bar item x
click
click 2nd menu item of front menu
end tell
end tell
-- synchronizacja isync
tell application "System Events" to set iSyncRunning to ¬
(number of items in (processes whose name is "iSync") is greater than 0)
tell application "iSync"
synchronize
repeat while (syncing is true)
delay 5
end repeat
if (iSyncRunning is not true and sync status is 2) then quit
end tell
-- wyłącza bluetooth
tell application "System Events" to tell the front menu bar of process "SystemUIServer"
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with x from 1 to the length of menu_extras
if item x of menu_extras is "bluetooth menu extra" then exit repeat
end repeat
tell menu bar item x
click
click 2nd menu item of front menu
end tell
end tell