The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Automatic Sync Script (http://forums.omnigroup.com/showthread.php?t=7210)

egorges 2008-02-18 09:13 AM

Automatic Sync Script
 
Hello, I am using Lingon to create a script to automatically sync omnifocus with ical. SInce I store my DB on a USB thumb-drive I want the script to run when a file is changed. What would be a good file to watch for changes? I am using "[I]/Volumes/Thumb/OmniFocus/OmniFocus.ofocus/root=2B165802-DD5A-487E-A5FE-661B1920A5D2:C6F9BFF1-8DA8-4BD8-8ABF-AA6D9C9E9513.xml[/I]" right now. Is there a better file to watch?

Thank You
Eric

Ken Case 2008-02-18 11:11 AM

I'd recommend watching the enclosing folder itself ("/Volumes/Thumb/OmniFocus/OmniFocus.ofocus") rather than any single transaction. (Once a transaction is written, it never changes.)

egorges 2008-02-18 11:26 AM

Thanks for the idea.. I was thinking the same thing. I'm not very familiar with scripting and lingon won't let me choose the folder itself (or I don't know how). I was using a cron for this and it worked great until I moved the database to a thumb-drive. It has a problem when the drive isn't mounted (obviously).

ambi 2008-02-18 12:12 PM

If the thumb-drive is seen as just another directory in your system, for example, under /Volumes, you might set your script to first check if the directory exists and to simply bail is it doesn't.

Antidote 2009-09-14 04:24 PM

I'm trying to set-up automatic iCal sync similar to OP, but am having trouble getting it to work. I would also like to have OmniFocus sync with iCal whenever any changes are made to OF. So far, I created the following script.

[QUOTE]
tell application "OmniFocus" to ical_synchronize
end
[/QUOTE]

I then installed Lingon and used the assistant to run a script when a file is modified. I set the label as iCal Sync. I selected the above script and directed lingon to moitor: "/Users/John/Library/Application Support/OmniFocus/OmniFocus.ofocus" However, I can't get it to work. I'm new to this so I'm not sure what I'm doing wrong.

Additionally, I'd like to have iCal sync back to OmniFocus whenever iCal is edited. Any help would be greatly appreciated.

scchang 2009-09-29 09:50 AM

[QUOTE=Antidote;66875]I'm trying to set-up automatic iCal sync similar to OP, but am having trouble getting it to work. I would also like to have OmniFocus sync with iCal whenever any changes are made to OF. So far, I created the following script.



I then installed Lingon and used the assistant to run a script when a file is modified. I set the label as iCal Sync. I selected the above script and directed lingon to moitor: "/Users/John/Library/Application Support/OmniFocus/OmniFocus.ofocus" However, I can't get it to work. I'm new to this so I'm not sure what I'm doing wrong.

Additionally, I'd like to have iCal sync back to OmniFocus whenever iCal is edited. Any help would be greatly appreciated.[/QUOTE]

I'd like to do the same and was wondering if you'd gotten it to work. Thanks.

2011 2011-07-02 02:57 AM

Up, someone got any answers how to do this? Sync iCal and OmniFocus automatically


All times are GMT -8. The time now is 11:54 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.