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

Click here to return to the 'Sync with iSync in the background' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sync with iSync in the background
Authored by: loren_ryter on May 02, '06 06:58:11AM
yes, it's true -- activate is exactly the same as "bring window to front". if you tell any application to do something without activate, it will do it without bringing it to the front. if the application is not running, it will be launched. for added guarantee that it gets launched, you can optionally use the command "launch" instead of activate.

here's a script i use to sync, which i have scheduled with cron to run daily. I think it was originally posted here. it has the added advantage of quitting iSync when done if it wasn't open when launched.

tell application "System Events" to set iSyncRunning to 
	(number of items in (processes whose name is "iSync") is greater than 0)
tell application "iSync"
	repeat while (syncing is true)
		delay 5
	end repeat
	if iSyncRunning is not true then quit
end tell

[ Reply to This | # ]