Hi,
I found in MacScripter a way to force synchronisation of my MobileMe data (previously .Mac). This is the script I found and it works great:
tell application "System Preferences"
activate
reveal anchor "sync" of pane id "com.apple.preference.internet"
end tell
tell application "System Events"
tell process "System Preferences"
repeat until exists window ".Mac"
delay 0.5
end repeat
tell button 1 of tab group 1 of window ".Mac"
repeat until enabled
delay 0.5
end repeat
perform action "AXPress"
end tell
delay 0.5
end tell
end tell
Could the script execute without moving windows and displaying the clicking of button ? Can all the process be done in the background ?
Regards.
Hi,
assuming the sync status is enabled in the menu bar,
and you’re running Leopard, try this
tell application "System Events"
tell process "SystemUIServer"
tell (1st menu bar item of menu bar 1 whose value of attribute "AXDescription" is "Sync")
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item "Sync Now" of menu 1
end tell
end tell
end tell
then try this, if the first menu item contains MobileMe, change .Mac into MobileMe.
Because in Tiger the AXDescriptions aren’t very descriptive, the script has to go thru the menus to find the right one
tell application "System Events"
tell process "SystemUIServer"
repeat with mni in (get menu bar items of menu bar 1)
if (value of attribute "AXDescription" of mni as string) is "" then
perform action "AXPress" of mni
set NameList to name of menu items of menu of mni
if item 1 of item 1 of NameList begins with "Last .Mac" then
perform action "AXPress" of menu item "Sync Now" of menu of mni
exit repeat
end if
end if
end repeat
end tell
end tell
Great ! I had to modify the menu items to fit my french system … and it works great. It is far better than the previous one. Is there also a way to prevent the pull down menu to expand ?
Yes, upgrade to Leopard! 
Seriously no, not with this GUI scripting way, I wrote above, why.
Maybe there is a shell command, but I don’t know it
I would have loved upgrading to Leopard, but I still need OS 9 for my accounting (french accounting). Until I find a good solution to organise my accounting with Leopard, I have to stick with Tiger.
I am wondering how easy it is to use VM Fusion or Parrallels to work simultaneously in the Mac and the PC world (gosh !!). This way I would be able to upgrade to Leopard. But I stll have to see if it works simply and efficiently. Need more time …
Thanks.
Hi Stefan,
Now that we have found a fix for MobileMe sync, do you also have a solution to script an automated backup with Apple’s Backup application ?
Backup is not scriptable, but maybe there is another way …
Thanks in advance.
Robert
sorry, I don’t use Backup.app and GUI scripting without testing won’t work 