Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Since just about anyone w/ .Mac accts needs this...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Since just about anyone w/ .Mac accts needs this...
Authored by: Graff on Nov 20, '03 04:06:41AM

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 NewCurrentMyCard to my card
        if NewCurrentMyCard is not CurrentMyCard then
          set my card to CurrentMyCard
          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 1
end idle

on 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 CurrentMyCard to my card
    tell application "iSync" to synchronize
    set isSynching to true
  end try
  idle
end run

Save the script using File -> Save As...

Select File Format -> Application and also select the checkbox "Stay Open"

Save it in /Applications/ (not ~/Applications/) as SyncScript

Download CronniX and install it.

Run CronniX. Click on the New button in the CronniX window.

Type in 50 for Minute and then click the first checkbox for the other options (Hour, Day of month, Month, Day of Week).

Type in "/Applications/SyncScript.app" for the command (do not type in the quotes)

Click New. The sheet should close. Click the Save button in the CronniX window. Quit CronniX. You should now be all set. The script will run at the 50th minute of every hour.



[ Reply to This | # ]
Since just about anyone w/ .Mac accts needs this...
Authored by: Graff on Nov 20, '03 04:10:16AM

One last thing, you need to do the CronniX setup for each account you want to run the script in. Just go in each account and repeat everything after the part about installing CronniX.



[ Reply to This | # ]
Since just about anyone w/ .Mac accts needs this...
Authored by: pairof9s on Nov 20, '03 05:45:09PM
I get an syntax error w/ the "tell" in this line:

set abookRun to tell application "Finder" to ¬

I would imagine it will happen in the iSyncRun line just below.

[ Reply to This | # ]
Since just about anyone w/ .Mac accts needs this...
Authored by: paulrob on Nov 21, '03 08:54:23AM

The line starting 'set abookRun to ... ' thru to ' .. contains "iSync"' 3 lines below should be replaced by: -

tell application "Finder"
set abookRun to (name of processes) contains "Address Book"
set iSyncRun to (name of processes) contains "iSync"
end tell



[ Reply to This | # ]
Since just about anyone w/ .Mac accts needs this...
Authored by: Graff on Nov 21, '03 12:45:14PM

Yeah, that way shortens the lines and produces basically the same script. I should have done that so that I could have avoided the line continuations which seem to cause so many headaches, but when you are doing stuff sometimes you just copy and paste and don't look to see if you should combine stuff.



[ Reply to This | # ]
Thanks everyone for the help!! *N/T*
Authored by: pairof9s on Nov 21, '03 01:10:45PM

n/t



[ Reply to This | # ]