This version is probably the most major release yet, and implements more features and fixes than the last three releases combined!ġ. For those of you who have been holding out on running iSync, this is the time to do it. Global CurrentM圜ardglobal aBookRunglobal iSyncRunglobal isSynchingon idle try if isSynching is true then tell application "iSync" to set isSynching to syncing if isSynching is false then try tell application "Address Book" set NewCurrentM圜ard to my card if NewCurrentM圜ard is not CurrentM圜ard then set my card to CurrentM圜ard save addressbook end if end tell on error display dialog "An error occurred when attempting to set \"My Card\" in Address Book" end try try if aBookRun is false then tell application "Address Book" to quit if iSyncRun is false then tell application "iSync" to quit quit on error display dialog "An error occured when attempting to quit Address Book and iSync." quit end try end if end if on error display dialog "An Error occurred in the Idle Handler." quit end try return 1end idleon run try tell application "Finder" set aBookRun to (name of processes) contains "Address Book" set iSyncRun to (name of processes) contains "iSync" end tell tell application "Address Book" to set CurrentM圜ard to my card tell application "iSync" to synchronize set isSynching to true on error display dialog "An Error occurred in the Run Handler.A new version of iSync for iPhone/iPod Touch has been released.
Browse to your script's location and save. Set Cronnix to run the script on the "Minute" you desire set the others (Hour, Day, etc.) to the "Any" setting. Note: Be sure and save the script as an application and check the "Stay Open" option. Set up the script to run via Cronnix and you now have an automatic means of performing the tasks. The script will run at the 50th minute of every hour.Īfter much work by Graf (another poster in this thread), the following script provides the ability to perform the My Card change in Address Book, sync w/ iSync, and then quit the applications. Click the Save button in the CronniX window. Type in "/Applications/SyncScript.app" for the command (do not type in the quotes)Ĭlick New. Type in 50 for Minute and then click the first checkbox for the other options (Hour, Day of month, Month, Day of Week). Click on the New button in the CronniX window. Save it in /Applications/ (not ~/Applications/) as SyncScript Select File Format -> Application and also select the checkbox "Stay Open" Open Script Editor and paste in this code: on idle try tell application "iSync" to set isSynching to syncing if isSynching is false then tell application "Address Book" set NewCurrentM圜ard to my card if NewCurrentM圜ard is not CurrentM圜ard then set my card to CurrentM圜ard save addressbook end if end tell if aBookRun is false then tell application "Address Book" to quit if iSyncRun is false then tell application "iSync" to quit quit end if end try return 1end idleon run try set abookRun to tell application "Finder" to ¬ (name of processes) contains "Address Book" set iSyncRun to tell application "Finder" to ¬ (name of processes) contains "iSync" tell application "Address Book" to set CurrentM圜ard to my card tell application "iSync" to synchronize set isSynching to true end try idleend run
I don't know if it is new in Panther, but I used the "save as a program" option in Script Editor 2.0, and placed a reference to it directly in my crontab for execution at 10 minutes to the hour: 50 * * * * /Users/myaccount/Scripts/sync_restore_my_card.appAnd it worked as expected. try - pick up current "my card" tell application "Address Book" to set CurrentM圜ard to my card - invoke a sync tell application "iSync" to synchronize - wait for sync to finish repeat tell application "iSync" if (syncing is false) then exit repeat do shell script "sleep 15" end if end tell end repeat - tell 'em who's the boss if iSync changed it tell application "Address Book" set NewCurrentM圜ard to my card if NewCurrentM圜ard is not CurrentM圜ard then set my card to CurrentM圜ard save addressbook end if end tellend tryPS: I seem to recall that it used to be difficult to run AppleScripts from the crontab. So, it was a piece of cake to write the following scriptlet which restores "my card" after performing a sync. This becomes annoying when, for example, iChat picks up the modified "my card" entry.Fortunately, the new Address Book in Panther lets you manipulate "my card" via AppleScript. Unfortunately, even under Panther, the "my card" entry also gets synchronized, so my wife becomes me and vice versa, depending upon who last changed an entry in the Address Book.
#WHAT IS ISYNC FOR MAC MAC#
mac to maintain the same address book and iCal calendar on my wife's Cube and my PowerBook.